aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/event-top.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1125b1e..58a7e98 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-10-29 Pedro Alves <palves@redhat.com>
+ * event-top.c (command_line_handler): Clear the first byte of
+ linebuffer, when it is first allocated.
+
+2014-10-29 Pedro Alves <palves@redhat.com>
+
* tui/tui.c (tui_rl_switch_mode): Wrap tui_enable/tui_disable in
TRY_CATCH.
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 3f9deec..f539733 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -467,6 +467,7 @@ command_line_handler (char *rl)
{
linelength = 80;
linebuffer = (char *) xmalloc (linelength);
+ linebuffer[0] = '\0';
}
p = linebuffer;