public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH]: missing check in gas/app.c
@ 2005-09-14  1:41 Arnold Metselaar
  2005-09-28 14:10 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: Arnold Metselaar @ 2005-09-14  1:41 UTC (permalink / raw)
  To: binutils

Hello

While working on as for target Z80, I noticed that a check for a 
full buffer was missing after an optimised copy in 
do_scrub_chars() in gas/app.c 
A patch is below, it works with the assembler for Z80.

Side note: I sent the copyright assignment for binutils to FSF, 
but I haven't heard from them yet. 

Arnold Metselaar

*** src/gas/app.c       2005-05-05 11:12:43.000000000 +0200
--- src/gas/app.c.new   2005-09-13 22:24:44.000000000 +0200
***************
*** 1302,1307 ****
--- 1302,1310 ----
                        case 1: *to++ = *from++;
                        }
                    }
+                 /* normally tested in PUT() */
+                 if (to >= toend)
+                     goto tofull;
                  ch = GET ();
                }
            }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: missing check in gas/app.c
  2005-09-14  1:41 [PATCH]: missing check in gas/app.c Arnold Metselaar
@ 2005-09-28 14:10 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2005-09-28 14:10 UTC (permalink / raw)
  To: Arnold Metselaar; +Cc: binutils

On Tue, Sep 13, 2005 at 10:41:09PM +0200, Arnold Metselaar wrote:
> *** src/gas/app.c       2005-05-05 11:12:43.000000000 +0200
> --- src/gas/app.c.new   2005-09-13 22:24:44.000000000 +0200
> ***************
> *** 1302,1307 ****
> --- 1302,1310 ----
>                         case 1: *to++ = *from++;
>                         }
>                     }
> +                 /* normally tested in PUT() */
> +                 if (to >= toend)
> +                     goto tofull;
>                   ch = GET ();
>                 }
>             }

Applied with this ChangeLog entry:

2005-09-28  Arnold Metselaar  <arnold.metselaar@planet.nl>

	* app.c (do_scrub_chars <LEX_IS_SYMBOL_COMPONENT>): Check for full
	buffer after copying string.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-28 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-14  1:41 [PATCH]: missing check in gas/app.c Arnold Metselaar
2005-09-28 14:10 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).