summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2010-05-27 15:04:41 -0300
committerVinicius Costa Gomes <vinicius.gomes@openbossa.org>2010-05-27 18:40:19 -0300
commit3118804df6e938cd197bac5294a8da022163dcc4 (patch)
tree2fdad8be94b5abe19750acd2aef27f874d87c6c0
parent2d0b26070d6e6b7efe37ca7ee8c8cbb1c77c9bc5 (diff)
downloadobexd-3118804df6e938cd197bac5294a8da022163dcc4.tar.gz
Fix crash on PBAP SetPhoneBook function
If the client doesn't send a NAME header, the folder argument may be NULL.
-rw-r--r--plugins/phonebook-tracker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 5c9e2a5..3851f94 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -305,6 +305,9 @@ static const char *name2query(const char *name)
static gboolean folder_is_valid(const char *folder)
{
+ if (folder == NULL)
+ return FALSE;
+
if (g_str_equal(folder, "/"))
return TRUE;
else if (g_str_equal(folder, "/telecom"))