PR gas/14082
authorNick Clifton <nickc@redhat.com>
Wed, 16 May 2012 15:25:30 +0000 (15:25 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 16 May 2012 15:25:30 +0000 (15:25 +0000)
* app.c (do_scrub_chars): Prevent possible out of bounds access to
lex[] array.

gas/ChangeLog
gas/app.c

index 4f59ea97d2dbfc151a7ed20ad702c90357c236bc..da9330f65a2add5183a900cc166a8817fafc5635 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-16  Alberto Garcia  <agarcia@igalia.com>
+
+       PR gas/14082
+       * app.c (do_scrub_chars): Prevent possible out of bounds access to
+       lex[] array.
+
 2012-05-16  Georg-Johann Lay  <avr@gjlay.de>
 
        PR target/13503
index e5a768716e97f3b2ab7d591a5756e3eb9814b050..aafee2a4a50001a782693cab5ffbcd059ef31408 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1344,7 +1344,7 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
              else
                {
                  state = 9;
-                 if (!IS_SYMBOL_COMPONENT (ch)) 
+                 if (ch == EOF || !IS_SYMBOL_COMPONENT (ch))
                    {
                      if (ch != EOF)
                        UNGET (ch);