This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix bug parsing angle bracketed string sequences.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 4 Jan 2019 15:59:27 -0000
- Subject: [binutils-gdb] Fix bug parsing angle bracketed string sequences.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49
commit bdfb4455977ffdd2d3f8dc81f25f6ba1ea2a7f49
Author: Wu Heng <wu.heng@zte.com.cn>
Date: Fri Jan 4 15:58:02 2019 +0000
Fix bug parsing angle bracketed string sequences.
PR 24009
* read.c (stringer): Fix handling of missing '>' character at end
of <...> sequence.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/read.c | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3fc4606..3caf705 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-04 Wu Heng <wu.heng@zte.com.cn>
+
+ PR 24009
+ * read.c (stringer): Fix handling of missing '>' character at end
+ of <...> sequence.
+
2019-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.
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 ',':