From: Nick Clifton Date: Wed, 16 May 2012 15:25:30 +0000 (+0000) Subject: PR gas/14082 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=536695d0f7f0ec6d32b0727fc6cb443455bbc333;p=binutils-gdb.git PR gas/14082 * app.c (do_scrub_chars): Prevent possible out of bounds access to lex[] array. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 4f59ea97d2d..da9330f65a2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2012-05-16 Alberto Garcia + + PR gas/14082 + * app.c (do_scrub_chars): Prevent possible out of bounds access to + lex[] array. + 2012-05-16 Georg-Johann Lay PR target/13503 diff --git a/gas/app.c b/gas/app.c index e5a768716e9..aafee2a4a50 100644 --- 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);