logo       

Re: bug: printf overruns an argument: msg#00096

gnu.core-utils.bugs

Subject: Re: bug: printf overruns an argument

...
> Here is a proposed patch for all these problems:
>
> 2003-03-24 Paul Eggert <eggert@xxxxxxxxxxx>
>
> Fix buffer overrun problem reported by TAKAI Kousuke, along
> with some other POSIX incompatibilities.
>
> * src/printf.c (print_esc): Do not treat \x specially if
> POSIXLY_CORRECT. Avoid buffer overrun if the format ends
> in backslash. Treat incomplete escape sequences as strings
> of characters, as POSIX requires.
> (print_formatted): Allow multiple flags. Avoid buffer overrun
> if the format is incomplete.

Thank you both!
I've applied this patch and added corresponding test cases.

> --- printf.c 2003/03/11 10:30:59 4.5.11.0
> +++ printf.c 2003/03/25 00:17:55 4.5.11.4


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise