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

Andreas Schwab schwab@suse.de
Tue Jul 1 14:22:06 GMT 2025


On Jul 01 2025, Maciej W. Rozycki wrote:

> On Tue, 1 Jul 2025, Andreas Schwab wrote:
>
>> The bug reference appears to be wrong.
>
>  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.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


More information about the Libc-alpha mailing list