]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/expr.c
asan: buffer overflows after calling ignore_rest_of_line
authorAlan Modra <amodra@gmail.com>
Thu, 17 Mar 2022 01:24:40 +0000 (11:54 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 17 Mar 2022 11:02:44 +0000 (21:32 +1030)
commit0d1064face9956be43774b81e9cdad5daea28c92
treeca43519e91660955464296ab9b48145c2613237b
parentdf573325cb23198af194a492842f957f8b6945b4
asan: buffer overflows after calling ignore_rest_of_line

operand() is not a place that should be calling ignore_rest_of_line.
ignore_rest_of_line shouldn't increment input_line_pointer if already
at buffer limit.

* expr.c (operand): Don't call ignore_rest_of_line.
* read.c (s_mri_common): Likewise.
(ignore_rest_of_line): Don't increment input_line_pointer if
already at buffer_limit.
gas/expr.c
gas/read.c