Bug in _scanf.c

Markos Chandras markos.chandras at gmail.com
Mon Mar 18 15:42:52 UTC 2013


On 18 March 2013 08:55, Pirmin Walthert <infos at nappsoft.com> 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
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc

Hi,

Please use git-format-patch to create a git patch and then use
git-send-email[1] to send it to the mailing list. It makes review much
easier

[1] http://www.uclibc.org/developing.html

-- 
Regards,
Markos Chandras


More information about the uClibc mailing list