mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
Fix use-after-free in number_or_range_parser
-fsanitize=address showed a use-after-free in number_or_range_parser. The cause was that handle_line_of_input could stash the input into "saved_command_line", and then this could be freed by reentrant calls. This fixes the bug by preventing commands that are read by "commands" from being eligible for repeating. gdb/ChangeLog 2018-08-17 Tom Tromey <tom@tromey.com> * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to command_line_input.
This commit is contained in:
parent
bfb1e8c15a
commit
1258253330
gdb
@ -1,3 +1,8 @@
|
||||
2018-08-17 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
|
||||
command_line_input.
|
||||
|
||||
2018-08-15 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
|
||||
|
@ -903,7 +903,7 @@ read_next_line (void)
|
||||
else
|
||||
prompt_ptr = NULL;
|
||||
|
||||
return command_line_input (prompt_ptr, from_tty, "commands");
|
||||
return command_line_input (prompt_ptr, 0, "commands");
|
||||
}
|
||||
|
||||
/* Return true if CMD's name is NAME. */
|
||||
|
Loading…
Reference in New Issue
Block a user