[PATCH] Fixing scanf small bug

Jakub Jelinek jakub@redhat.com
Tue Apr 26 14:56:00 GMT 2005


On Sun, Apr 24, 2005 at 12:41:35PM -0700, Ulrich Drepper wrote:
> Hamed Malek wrote:
> 
> > Attached is the corrected version of previous patch which adds matched
> > decimal point after it succeed.
> 
> Yes, but no test case and no changelog entry.  I added the patch now,
> but the next time I might just ignore it.

Ignoring would be IMHO much better, because the patch is clearly broken.
It e.g. breaks tst-sscanf.c:
Double sscanf test 0 failed (-1e+19 instead of -10)

That is in essence:
sscanf ("-.10000E+020.20000E+02", "%11lf%11lf", &d, &e);
and the broken patch eats the dot as if it did not occupy any width.

And without a testcase it is hard to see what actually was broken
previously (if anything).

	Jakub



More information about the Libc-alpha mailing list