[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
Wed Aug 6 17:35:17 GMT 2025


On Thu, 31 Jul 2025, Adhemerval Zanella Netto wrote:

> > Fix a code pattern that repeats across '__vfscanf_internal' where the 
> > remaining field width of 0 is incorrectly interpreted as no width limit, 
> > which in turn results in reading input beyond the limit requested.  The 
> > lack of width limit is indicated by the field width of -1 rather than 0, 
> > set earlier on in the function.
[...]
> 
> I will to move this patchset forward.  This is only a nit below,
> otherwise LGTM.  And I agree with Andreas that the bug reference
> was confusing, I first checked it and it was not obvious to me why
> you referenced until I read the commit message in full.

 Thank you for your review.  I have updated the change as requested and 
posted v3 here: 
<https://inbox.sourceware.org/libc-alpha/c6f4f550-54e5-7bd2-6d94-e074986aa3e4@redhat.com/>.  
I've included your review tag and will commit the change after usual 48h; 
please do let me know if you disagree with the way I have addressed your 
feedback.

 I have rebased the whole series against current trunk and rerun the same 
verification as described in the cover letter.  As there's been no change 
in the course to patches 02-14, not even mechanical one, I think there's 
little point in reposting the series only to clutter people's inboxes, but 
I can do so if that helped in any way.

  Maciej



More information about the Libc-alpha mailing list