From e9e5e6b3fb7b57350bdf798c8c6a49d7b62b65cf Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 21 May 2012 15:27:24 +0000 Subject: [PATCH] * macroexp.c (macro_stringify): Terminate the string. --- gdb/ChangeLog | 4 ++++ gdb/macroexp.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d8442e56b81..5fd2f3c44a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2012-05-21 Tom Tromey + + * macroexp.c (macro_stringify): Terminate the string. + 2012-05-20 Jan Kratochvil * NEWS (--with-auto-load-dir): Prepend $debugdir to the default path. diff --git a/gdb/macroexp.c b/gdb/macroexp.c index 22b904e6249..fa3431169ea 100644 --- a/gdb/macroexp.c +++ b/gdb/macroexp.c @@ -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); } -- 2.30.2