From: John (J5) Palmieri Date: Thu, 3 Aug 2006 20:02:37 +0000 (+0000) Subject: * dbus/dbus-object-tree.c: Patch by Benjamin Otte X-Git-Tag: dbus-0.92~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baf72e43951b1fefd23c7d246b76939e3c72fc14;p=thirdparty%2Fdbus.git * dbus/dbus-object-tree.c: Patch by Benjamin Otte - fix invalid read/write reported by valgrind --- diff --git a/ChangeLog b/ChangeLog index 0238cc93e..bea0e156a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-03 John (J5) Palmieri + + * dbus/dbus-object-tree.c: Patch by Benjamin Otte + - fix invalid + read/write reported by valgrind + 2006-07-24 John (J5) Palmieri * Released 0.91 diff --git a/dbus/dbus-object-tree.c b/dbus/dbus-object-tree.c index 407ba6dc7..27dc5f17a 100644 --- a/dbus/dbus-object-tree.c +++ b/dbus/dbus-object-tree.c @@ -935,7 +935,7 @@ allocate_subtree_object (const char *name) len = strlen (name); - subtree = dbus_malloc (front_padding + (len + 1)); + subtree = dbus_malloc (MAX (front_padding + (len + 1), sizeof (DBusObjectSubtree))); if (subtree == NULL) return NULL;