]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
* Fixed buffer overflow cause by not incrementing
authorJohn (J5) Palmieri <johnp@redhat.com>
Fri, 23 Apr 2004 15:25:16 +0000 (15:25 +0000)
committerJohn (J5) Palmieri <johnp@redhat.com>
Fri, 23 Apr 2004 15:25:16 +0000 (15:25 +0000)
the times_we_did_each_thing counter array to reflect
the number of random mutation functions we have.

ChangeLog
test/break-loader.c

index 04e397e741feb92cd891399cd055cffe108844e4..33877ceab36a69c1e593e11ce62eb705a8ed91ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
+       (randomly_do_n_things): tracked down buffer overflow
+       to times_we_did_each_thing array which would chop off
+       the first character of the failure_dir string. Increased
+       the size of the array to 7 to reflect the number of
+       random mutation functions we have. 
+
 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
 
        * dbus/dbus-server-unix.c (unix_finalize): Don't unref
index a0ac5642adf91a0b7ed780d628a5f267ae0766ab..5cdc86543721a2509d7684841fa9ae05efb68754 100644 (file)
@@ -454,7 +454,7 @@ randomly_change_one_type (const DBusString *orig_data,
     }
 }
 
-static int times_we_did_each_thing[6] = { 0, };
+static int times_we_did_each_thing[7] = { 0, };
 
 static void
 randomly_do_n_things (const DBusString *orig_data,
@@ -741,14 +741,15 @@ main (int    argc,
           return 1;
         }
 
-      printf ("  did %d random mutations: %d %d %d %d %d %d\n",
+      printf ("  did %d random mutations: %d %d %d %d %d %d %d\n",
               _DBUS_N_ELEMENTS (times_we_did_each_thing),
               times_we_did_each_thing[0],
               times_we_did_each_thing[1],
               times_we_did_each_thing[2],
               times_we_did_each_thing[3],
               times_we_did_each_thing[4],
-              times_we_did_each_thing[5]);
+              times_we_did_each_thing[5],
+              times_we_did_each_thing[6]);
       
       printf ("Found %d failures with seed %u stored in %s\n",
               failures_this_iteration, seed, failure_dir_c);