From 3e52d5a70e6cedb3f2a5decdf5ebbd1b5f27cd4f Mon Sep 17 00:00:00 2001 From: Luiz Augusto Von Dentz Date: Tue, 25 May 2010 23:52:26 +0300 Subject: [PATCH] obexd: Fix possible crash when obex_get_name returns NULL Make use of g_strcmp0 which is a NULL-safe string comparison function --- obexd/plugins/opp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obexd/plugins/opp.c b/obexd/plugins/opp.c index fc695441f..976db1f73 100644 --- a/obexd/plugins/opp.c +++ b/obexd/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); -- 2.47.3