bug#1137: [uClibc]bug#1137: scanf() has problems with max-widths and leading zeros

Manuel Novoa III mnovoa3 at bellsouth.net
Thu Mar 22 19:22:56 UTC 2001


On Thu, 22 Mar 2001, Peter Kjellerstedt wrote:
> Package: uClibc
> Version: CVS
> Severity: normal
> 
> The latest scanf() in CVS (uClibc/stdio/scanf.c 1.11) does not handle
> max-widths very well in case the scanned string starts with a zero.
> The problem is that sc->width is always decreased in scan_getc(), but
> it is not increased in scan_ungetc(). This can, however, only be done
> if scan_ungetc() is called after a call to scan_getc(), but not after
> a call to scan_getc_nw(). Therefore a flag is needed to keep track of
> whether sc->width should be increased or not.

Oops... thanks for the fix.  I'll take care of it later today.

Manuel






More information about the uClibc mailing list