2006-06-21 Andrew Stubbs <andrew.stubbs@st.com>
authorAndrew Stubbs <andrew.stubbs@st.com>
Wed, 21 Jun 2006 10:49:16 +0000 (10:49 +0000)
committerAndrew Stubbs <andrew.stubbs@st.com>
Wed, 21 Jun 2006 10:49:16 +0000 (10:49 +0000)
        * cli/cli-script.c (realloc_body_list): Zero new parts of body_list.

gdb/ChangeLog
gdb/cli/cli-script.c

index 463cf7a..0007058 100644 (file)
@@ -1,3 +1,7 @@
+2006-06-21  Andrew Stubbs  <andrew.stubbs@st.com>
+
+        * cli/cli-script.c (realloc_body_list): Zero new parts of body_list.
+
 2006-06-20  Joel Brobecker  <brobecker@adacore.com>
 
        * GDB 6.5 released from GDB 6.5 branch.
index 4f44477..643eb74 100644 (file)
@@ -701,6 +701,7 @@ realloc_body_list (struct command_line *command, int new_length)
     xmalloc (sizeof (struct command_line *) * new_length);
 
   memcpy (body_list, command->body_list, sizeof (struct command_line *) * n);
+  memset (body_list + n, 0, sizeof (struct command_line *) * (new_length - n));
 
   xfree (command->body_list);
   command->body_list = body_list;