aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorWu Heng <wu.heng@zte.com.cn>2019-01-04 15:58:02 +0000
committerNick Clifton <nickc@redhat.com>2019-01-04 15:58:02 +0000
commitbdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49 (patch)
tree7cc8eb20fa803309cc8a2f1a4756919716cff2bf /gas/read.c
parentd9858c37914e104401071b12b060765024008fe4 (diff)
downloadgdb-bdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49.zip
gdb-bdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49.tar.gz
gdb-bdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49.tar.bz2
Fix bug parsing angle bracketed string sequences.
PR 24009 * read.c (stringer): Fix handling of missing '>' character at end of <...> sequence.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index 9c4a98b..3c84d43 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -5390,8 +5390,11 @@ stringer (int bits_appendzero)
c = get_single_number ();
stringer_append_char (c, bitsize);
if (*input_line_pointer != '>')
- as_bad (_("expected <nn>"));
-
+ {
+ as_bad (_("expected <nn>"));
+ ignore_rest_of_line ();
+ return;
+ }
input_line_pointer++;
break;
case ',':