diff options
author | Alan Modra <amodra@gmail.com> | 2022-03-17 11:54:40 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-03-17 21:32:44 +1030 |
commit | 0d1064face9956be43774b81e9cdad5daea28c92 (patch) | |
tree | ca43519e91660955464296ab9b48145c2613237b /gas/expr.c | |
parent | df573325cb23198af194a492842f957f8b6945b4 (diff) | |
download | binutils-0d1064face9956be43774b81e9cdad5daea28c92.zip binutils-0d1064face9956be43774b81e9cdad5daea28c92.tar.gz binutils-0d1064face9956be43774b81e9cdad5daea28c92.tar.bz2 |
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.
Diffstat (limited to 'gas/expr.c')
-rw-r--r-- | gas/expr.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1212,9 +1212,7 @@ operand (expressionS *expressionP, enum expr_mode mode) { as_bad (_("expected symbol name")); (void) restore_line_pointer (c); - if (c != ')') - ignore_rest_of_line (); - else + if (c == ')') ++input_line_pointer; break; } |