summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto Von Dentz <luiz.dentz-von@nokia.com>2010-05-25 23:52:26 +0300
committerLuiz Augusto Von Dentz <luiz.dentz-von@nokia.com>2010-05-25 23:52:26 +0300
commit15e7e0c07fcb77e30c72855a85fdfff2dda0b245 (patch)
treec87c4b0517c318b58e51556291cabaa43014d6ae
parentb552fca84bf096c229f90d0070761da31b4ffdb4 (diff)
downloadobexd-15e7e0c07fcb77e30c72855a85fdfff2dda0b245.tar.gz
Fix possible crash when obex_get_name returns NULL
Make use of g_strcmp0 which is a NULL-safe string comparison function
-rw-r--r--plugins/opp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/opp.c b/plugins/opp.c
index fc69544..976db1f 100644
--- a/plugins/opp.c
+++ b/plugins/opp.c
@@ -140,7 +140,7 @@ skip_auth:
if (name == NULL || strlen(name) == 0)
return -EBADR;
- if (g_str_equal(name, obex_get_name(os)) == FALSE)
+ if (g_strcmp0(name, obex_get_name(os)) != 0)
obex_set_name(os, name);
path = g_build_filename(folder, name, NULL);