linux-mips
[Top] [All Lists]

Re: [PATCH]: fix possible buffer overflow problem in promlib

To: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH]: fix possible buffer overflow problem in promlib
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 3 Jan 2003 13:54:23 +0100
Cc: Juan Quintela <quintela@mandrakesoft.com>, mipslist <linux-mips@linux-mips.org>
In-reply-to: <Pine.GSO.4.21.0301022047090.4873-100000@vervain.sonytel.be>; from geert@linux-m68k.org on Thu, Jan 02, 2003 at 08:47:49PM +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <m2hecrbb3p.fsf@demo.mitica> <Pine.GSO.4.21.0301022047090.4873-100000@vervain.sonytel.be>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Thu, Jan 02, 2003 at 08:47:49PM +0100, Geert Uytterhoeven wrote:

> On 2 Jan 2003, Juan Quintela wrote:
> >         as the issue about prom.h is still not clear, please aply the
> >         trivial part.
> 
> >  void prom_printf(char *fmt, ...)
> >  {
> >     va_list args;
> > -   char ppbuf[1024];
> > +   char ppbuf[BUFSIZE];
> 
> What about making ppbuf static, to reduce stack usage?

By the time when prom_printf() is called stack overflow is not really a
consideration anymore, something fatal has happened before.

prom_printf() is our own variant of early_print() so eventually should
be replaced by that anyway.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>