aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-01-01 10:57:43 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-01-01 10:57:43 +0000
commitbe66db074f9a3fd3857a4d81e9b41b0fa98b07a3 (patch)
tree2f4743162f574d551f3db38c5644716d8ce945c2 /gdb/cli
parentdc3cf14f35b666eed7be13100ff58639450aa5cf (diff)
downloadgdb-be66db074f9a3fd3857a4d81e9b41b0fa98b07a3.zip
gdb-be66db074f9a3fd3857a4d81e9b41b0fa98b07a3.tar.gz
gdb-be66db074f9a3fd3857a4d81e9b41b0fa98b07a3.tar.bz2
gdb/
* cli/cli-script.c (process_next_line): Check P2 overrun.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 4509cfc..dae4d64 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -893,7 +893,7 @@ process_next_line (char *p, struct command_line **command, int parse_commands)
p2 = p;
/* Strip leading whitespace. */
- while (*p2 == ' ' || *p2 == '\t')
+ while (p2 != p1 && (*p2 == ' ' || *p2 == '\t'))
p2++;
/* 'end' is always recognized, regardless of parse_commands value.