mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-09 17:12:54 +00:00
gdb/
* cli/cli-script.c (process_next_line): Check P2 overrun.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user