* dbus/dbus-object-tree.c: Patch by Benjamin Otte
authorJohn (J5) Palmieri <johnp@redhat.com>
Thu, 3 Aug 2006 20:02:37 +0000 (20:02 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Thu, 3 Aug 2006 20:02:37 +0000 (20:02 +0000)
  <in7y118 at public.uni-hamburg dot de> - fix invalid
  read/write reported by valgrind

ChangeLog
dbus/dbus-object-tree.c

index 0238cc9..bea0e15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-03  John (J5) Palmieri  <johnp@redhat.com>
+
+       * dbus/dbus-object-tree.c: Patch by Benjamin Otte 
+       <in7y118 at public.uni-hamburg dot de> - fix invalid
+       read/write reported by valgrind
+
 2006-07-24  John (J5) Palmieri  <johnp@redhat.com>
 
        * Released 0.91
index 407ba6d..27dc5f1 100644 (file)
@@ -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;