Fix bug parsing angle bracketed string sequences.
authorWu Heng <wu.heng@zte.com.cn>
Fri, 4 Jan 2019 15:58:02 +0000 (15:58 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 4 Jan 2019 15:58:02 +0000 (15:58 +0000)
PR 24009
* read.c (stringer): Fix handling of missing '>' character at end
of <...> sequence.

gas/ChangeLog
gas/read.c

index 3fc4606d0a69b7017e95e48201c8281df262e06a..3caf7052a7a1ae859e9425d376ca2a89a2528d7c 100644 (file)
@@ -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.
index 9c4a98bbfd4345e57a22718923fae35a0707e6a7..3c84d4388c841567a32057d05e720462115a6c3c 100644 (file)
@@ -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 ',':