[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug: printf overruns an argument
From: |
Jim Meyering |
Subject: |
Re: bug: printf overruns an argument |
Date: |
Tue, 25 Mar 2003 10:01:25 +0100 |
...
> Here is a proposed patch for all these problems:
>
> 2003-03-24 Paul Eggert <address@hidden>
>
> 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