diff options
author | Alan Modra <amodra@gmail.com> | 2016-04-02 17:17:26 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-04-02 17:31:36 +1030 |
commit | 62bd6b5fa4697a0feef745f3ea79a9f2a28c163f (patch) | |
tree | 6885dbc6df8360754cda0be3fb6a33f98e22325e /gas/read.c | |
parent | 5b8cf793a7651f4c8af218fcf0d885e63cc692c7 (diff) | |
download | gdb-62bd6b5fa4697a0feef745f3ea79a9f2a28c163f.zip gdb-62bd6b5fa4697a0feef745f3ea79a9f2a28c163f.tar.gz gdb-62bd6b5fa4697a0feef745f3ea79a9f2a28c163f.tar.bz2 |
PR19896, Segmentation fault on bad input
PR 19896
* read.c (assign_symbol): Consume rest of line after an error
rather than continuing to process the line.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3255,7 +3255,9 @@ assign_symbol (char *name, int mode) && !S_CAN_BE_REDEFINED (symbolP)) { as_bad (_("symbol `%s' is already defined"), name); - symbolP = symbol_clone (symbolP, 0); + ignore_rest_of_line (); + input_line_pointer--; + return; } /* If the symbol is volatile, copy the symbol and replace the original with the copy, so that previous uses of the symbol will |