aboutsummaryrefslogtreecommitdiff
path: root/gdb/macroexp.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-05-21 15:27:24 +0000
committerTom Tromey <tromey@redhat.com>2012-05-21 15:27:24 +0000
commite9e5e6b3fb7b57350bdf798c8c6a49d7b62b65cf (patch)
treefab97bba710cba19dc63030634b56cd51e1a831d /gdb/macroexp.c
parent8bbeae90c581eef4bd6c060952c372dc8e7d7a75 (diff)
downloadfsf-binutils-gdb-e9e5e6b3fb7b57350bdf798c8c6a49d7b62b65cf.zip
fsf-binutils-gdb-e9e5e6b3fb7b57350bdf798c8c6a49d7b62b65cf.tar.gz
fsf-binutils-gdb-e9e5e6b3fb7b57350bdf798c8c6a49d7b62b65cf.tar.bz2
* macroexp.c (macro_stringify): Terminate the string.
Diffstat (limited to 'gdb/macroexp.c')
-rw-r--r--gdb/macroexp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index 22b904e..fa34311 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);
}