aboutsummaryrefslogtreecommitdiff
path: root/gdb/event-top.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-23 17:27:39 +0000
committerTom Tromey <tromey@redhat.com>2009-09-23 17:27:39 +0000
commit20bb6bc822fb4105261dc8de1cb878fe8d45080d (patch)
treee96f8acb54555ef58887cbf1438ea9ac56ec75eb /gdb/event-top.c
parent417ba50c7df9d7776d53635d28b7630eb13735af (diff)
downloadgdb-20bb6bc822fb4105261dc8de1cb878fe8d45080d.zip
gdb-20bb6bc822fb4105261dc8de1cb878fe8d45080d.tar.gz
gdb-20bb6bc822fb4105261dc8de1cb878fe8d45080d.tar.bz2
2009-09-23 John Wright <john.wright@hp.com>
PR gdb/10684: * event-top.c (command_line_handler): Terminate linebuffer before xstrdup.
Diffstat (limited to 'gdb/event-top.c')
-rw-r--r--gdb/event-top.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 790cebf..52a5ad7 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -622,6 +622,7 @@ command_line_handler (char *rl)
if (p > linebuffer && *(p - 1) == '\\')
{
+ *p = '\0';
p--; /* Put on top of '\'. */
readline_input_state.linebuffer = xstrdup (linebuffer);