https://bugs.meego.com/show_bug.cgi?id=22152
pohly <patrick.ohly(a)intel.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |patrick.ohly(a)intel.com
Resolution| |FIXED
--- Comment #1 from pohly <patrick.ohly(a)intel.com> 2011-08-15 13:12:46 UTC ---
commit 40bbb59028a72bd62dff9ce26a152af30d8c11f3
Author: Patrick Ohly <patrick.ohly(a)intel.com>
Date: Mon Aug 15 13:23:09 2011 +0200
gdbus: fixed segfault when asked for properties when none are available
(BMC #22152)
The gdbus utility library crashed here if interface->properties was NULL:
for (property = interface->properties; property->name; property++)
^^^^^^^^^^^^^^
Fixed by checking property for non-NULL in the for loop.
diff --git a/src/gdbus/object.c b/src/gdbus/object.c
index ec8f16c..dcaed57 100644
--- a/src/gdbus/object.c
+++ b/src/gdbus/object.c
@@ -94,7 +94,7 @@ static BDBusPropertyTable *find_property(InterfaceData
*interface,
if (interface == NULL)
return NULL;
- for (property = interface->properties; property->name; property++)
+ for (property = interface->properties; property && property->name;
property++)
if (strcmp(property->name, name) == 0)
return property;
@@ -490,7 +490,7 @@ static void do_getall(DBusConnection *connection,
DBusMessageIter *iter,
if (interface == NULL)
return;
- for (property = interface->properties; property->name; property++) {
+ for (property = interface->properties; property && property->name;
property++) {
DBusMessage *message;
DBusMessageIter entry, value;
dbus_bool_t result;
--------
Product: SyncEvolution
Component: SyncEvolution
MeeGo Release: unspecified
Severity: normal
Priority: Undecided
Keywords:
Status: RESOLVED
Who: patrick.ohly(a)intel.com
Assigned To: syncevolution-bugs(a)meego.bugs
Target Build: ---
Flags:
Changed: Status CC Resolution
--------
https://bugs.meego.com/show_bug.cgi?id=22152
--
Configure bugmail:
https://bugs.meego.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.