[PATCH v2 01/14] stdio-common: Don't read real input beyond the field width in scanf [BZ #13988]

Maciej W. Rozycki macro@redhat.com
Tue Jul 1 17:18:25 GMT 2025


On Tue, 1 Jul 2025, Andreas Schwab wrote:

> >  As written in the commit description:
> >
> > "Referring BZ #13988 as a class bug rather than the specific issue."
> >
> > and then quoting BZ #13988:
> >
> > "Given the input "+.e", scanf (using %f) will correctly reject it as 
> > non-matching, but will leave the file position at an incorrect offset of 3 
> > rather than 2."
> >
> > this is the same kind of bug.  If you think this is not sufficient to 
> > justify a reference, then I can drop it.  Or please advise if you have 
> > anything else in mind.  Thank you for your input.
> 
> I think reading past the field boundary is a different kind of bug than
> reading too much from non-matching input.

 Fair enough.  I'll drop the bug references then from the commit heading 
and description.  Thank you for your review.

 NB I'm not going to repost the series just for these updates.  If there's 
another iteration, then I'll include the changes there, or otherwise I'll 
just push the commit with the amendmends made, as they are straightforward 
deletions, i.e. no need to rephrase anything or suchlike.

  Maciej



More information about the Libc-alpha mailing list