PR 4722
authorAlan Modra <amodra@gmail.com>
Tue, 3 Jul 2007 02:42:16 +0000 (02:42 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 3 Jul 2007 02:42:16 +0000 (02:42 +0000)
* app.c (do_scrub_chars <state 5>): Check for output buffer full
after memcpy.

gas/ChangeLog
gas/app.c

index a1b434a..170934e 100644 (file)
@@ -1,3 +1,9 @@
+2007-07-03  Mikkel Lauritsen  <renard@nospam.dk>
+
+       PR 4722
+       * app.c (do_scrub_chars <state 5>): Check for output buffer full
+       after memcpy.
+
 2007-07-02  Joseph Myers  <joseph@codesourcery.com>
 
        * config/tc-mips.c (s_dtprelword, s_dtpreldword,
index d7eb509..e5f1778 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -550,6 +550,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
                memcpy (to, from, len);
                to += len;
                from += len;
+               if (to >= toend)
+                 goto tofull;
              }
          }