(For sure just resetting i after the "while (*fmt !=']')" loop would be
enough, but this would somehow ruin the "set the vars once, use them in
every of the three functions" approach of commit
e567c399ff86d007d8c4586f0dd5e0ca61e283ca)
On 03/18/2013 09:55 AM, Pirmin Walthert wrote:
Hello
It seems like commit e567c399ff86d007d8c4586f0dd5e0ca61e283ca
<http://git.uclibc.org/uClibc/commit/?h=0.9.33&id=e567c399ff86d007d8c4586f0dd5e0ca61e283ca>
had introduced a bug into _scanf.c.
I noticed this first when netstat started giving me quite strange
outputs. The attached patch fixes the problem for me. The most
important change was to use j instead of i, as i is also used in the
"if (*fmt != ']')" loop starting on line 1436.
The other changes should not change anything I guess, but it makes the
'm'-modifier case working a bit more like before commit
e567c399ff86d007d8c4586f0dd5e0ca61e283ca
<http://git.uclibc.org/uClibc/commit/?h=0.9.33&id=e567c399ff86d007d8c4586f0dd5e0ca61e283ca>
(for example: *ptr = b would also have been set in "fail" case before
the mentioned commit. With my patch the order of setting *p, changing
j and __scan_ungetc is the same one as before)).
Regards,
Pirmin
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc