From: Alan Modra Date: Tue, 3 Jul 2007 02:42:16 +0000 (+0000) Subject: PR 4722 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df816087248d86b7397528dfceb82ed3952bd3c2;p=binutils-gdb.git PR 4722 * app.c (do_scrub_chars ): Check for output buffer full after memcpy. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a1b434a1e10..170934edb8d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2007-07-03 Mikkel Lauritsen + + PR 4722 + * app.c (do_scrub_chars ): Check for output buffer full + after memcpy. + 2007-07-02 Joseph Myers * config/tc-mips.c (s_dtprelword, s_dtpreldword, diff --git a/gas/app.c b/gas/app.c index d7eb50926d2..e5f177801fd 100644 --- 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; } }