[PATCH] Fix vfwscanf(3) assignment suppression flag handling bug

Corinna Vinschen vinschen@redhat.com
Mon Jun 3 08:41:00 GMT 2019

On Jun  1 10:33, Lucio Andrés Illanes Albornoz wrote:
> newlib's vfwscanf(3) (or specifically, __SVFWSCANF_R()) fails to correctly set
> the assignment-suppressing character (`*') flag[1] which, when present in the
> formatting string, results in undefined behaviour comprising retrieving and
> dereferencing a pointer that was not supplied by the caller as such or at all.
> When compared to the vfscanf(3) implementation, this would appear to be over
> the missing goto match_failure statement preceded by the flags test seen below.
> Hence, this patch (re)introduces it.
> [1] <http://pubs.opengroup.org/onlinepubs/009695399/functions/fwscanf.html>



Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20190603/902fd06e/attachment.sig>

More information about the Newlib mailing list