public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/27650] New: vfscanf returns too early if a match is longer than INT_MAX
@ 2021-03-25 13:56 hi at alyssa dot is
2021-03-25 14:06 ` [Bug stdio/27650] " hi at alyssa dot is
2021-05-03 8:57 ` fweimer at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: hi at alyssa dot is @ 2021-03-25 13:56 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27650
Bug ID: 27650
Summary: vfscanf returns too early if a match is longer than
INT_MAX
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: stdio
Assignee: unassigned at sourceware dot org
Reporter: hi at alyssa dot is
Target Milestone: ---
Created attachment 13328
--> https://sourceware.org/bugzilla/attachment.cgi?id=13328&action=edit
Reproduction for the issue
A pattern of unlimited length, like "%*[^\n]", will return as if it had a match
after INT_MAX characters, even if further matching is possible.
A minimal reproduction is attached.
On musl and NetBSD, match lengths are unlimited.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug stdio/27650] vfscanf returns too early if a match is longer than INT_MAX
2021-03-25 13:56 [Bug stdio/27650] New: vfscanf returns too early if a match is longer than INT_MAX hi at alyssa dot is
@ 2021-03-25 14:06 ` hi at alyssa dot is
2021-05-03 8:57 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: hi at alyssa dot is @ 2021-03-25 14:06 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27650
Alyssa Ross <hi at alyssa dot is> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--- Comment #1 from Alyssa Ross <hi at alyssa dot is> ---
Patch: https://sourceware.org/pipermail/libc-alpha/2021-March/124382.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug stdio/27650] vfscanf returns too early if a match is longer than INT_MAX
2021-03-25 13:56 [Bug stdio/27650] New: vfscanf returns too early if a match is longer than INT_MAX hi at alyssa dot is
2021-03-25 14:06 ` [Bug stdio/27650] " hi at alyssa dot is
@ 2021-05-03 8:57 ` fweimer at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2021-05-03 8:57 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=27650
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.34
CC| |fweimer at redhat dot com
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Fixed in glibc 2.34 with:
commit b03e4d7bd25b1ac485f858f0a857ba6085e8c9b0
Author: Alyssa Ross <hi@alyssa.is>
Date: Mon May 3 10:34:11 2021 +0200
stdio: fix vfscanf with matches longer than INT_MAX (bug 27650)
Patterns like %*[ can safely be used to match a great many characters,
and it's quite realisitic to use them for more than INT_MAX characters
from an IO stream.
With the previous approach, after INT_MAX characters (v)fscanf would
return successfully, indicating an end to the match, even though there
wasn't one.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-03 8:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 13:56 [Bug stdio/27650] New: vfscanf returns too early if a match is longer than INT_MAX hi at alyssa dot is
2021-03-25 14:06 ` [Bug stdio/27650] " hi at alyssa dot is
2021-05-03 8:57 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).