* macroexp.c (macro_stringify): Terminate the string.
authorTom Tromey <tromey@redhat.com>
Mon, 21 May 2012 15:27:24 +0000 (15:27 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 21 May 2012 15:27:24 +0000 (15:27 +0000)
gdb/ChangeLog
gdb/macroexp.c

index d8442e56b81b2b901ab6dab8fe3bfdffb07b3995..5fd2f3c44a3e4d68cce79c575ab6cd3d3d8d6474 100644 (file)
@@ -1,3 +1,7 @@
+2012-05-21  Tom Tromey  <tromey@redhat.com>
+
+       * macroexp.c (macro_stringify): Terminate the string.
+
 2012-05-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * NEWS (--with-auto-load-dir): Prepend $debugdir to the default path.
index 22b904e624950ed35b97215072553fdd95f3236c..fa3431169ea3845832017b52b39b81a78e416047 100644 (file)
@@ -704,6 +704,7 @@ macro_stringify (const char *str)
 
   init_buffer (&buffer, len);
   stringify (&buffer, str, len);
+  appendc (&buffer, '\0');
 
   return free_buffer_return_text (&buffer);
 }
This page took 0.028776 seconds and 4 git commands to generate.