public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bugdal at aerifal dot cx" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12701] scanf accepts non-matching input Date: Mon, 02 May 2011 02:36:00 -0000 [thread overview] Message-ID: <bug-12701-131-C5uH69LBnY@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-12701-131@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=12701 Rich Felker <bugdal at aerifal dot cx> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | --- Comment #2 from Rich Felker <bugdal at aerifal dot cx> 2011-05-02 02:35:40 UTC --- They are not correctly handled. Please refer to C99, 7.19.6.2, paragraph 9, which defines an input item as: "the longest sequence of input characters which does not exceed any specified field width and which is, or is a prefix of, a matching input sequence" Paragraph 10 then reads: "If the input item is not a matching sequence, the execution of the directive fails: this condition is a matching failure." Clearly in the case of sscanf("0xz", "%x%c", &x, &c), the first "input item" is "0x", and it is not a matching sequence for the %x conversion (see the specification of strtoul, in terms of which scanf %x is specified), so the result must be a matching failure. If you're going to wrongly mark this bug as "RESOLVED", at least mark it "WONTFIX" rather than "INVALID" and acknowledge that it's a bug that you're unwilling to fix, and that glibc is intentionally non-conformant in this matter. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2011-05-02 2:36 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-25 15:13 [Bug libc/12701] New: " bugdal at aerifal dot cx 2011-05-02 1:40 ` [Bug libc/12701] " drepper.fsp at gmail dot com 2011-05-02 2:36 ` bugdal at aerifal dot cx [this message] 2011-05-03 0:31 ` drepper.fsp at gmail dot com 2011-05-03 0:40 ` bugdal at aerifal dot cx 2011-05-03 1:14 ` drepper.fsp at gmail dot com 2011-05-03 2:24 ` bugdal at aerifal dot cx 2011-09-25 4:42 ` bugdal at aerifal dot cx 2011-10-29 17:14 ` drepper.fsp at gmail dot com 2011-10-29 21:24 ` bugdal at aerifal dot cx 2011-10-29 21:37 ` drepper.fsp at gmail dot com 2011-10-29 22:04 ` ldv at altlinux dot org 2011-10-30 5:43 ` bugdal at aerifal dot cx 2012-02-21 2:12 ` [Bug stdio/12701] " jsm28 at gcc dot gnu.org 2012-03-17 20:39 ` bugdal at aerifal dot cx 2012-03-18 17:17 ` jsm28 at gcc dot gnu.org 2012-04-18 5:23 ` bugdal at aerifal dot cx 2012-11-26 8:26 ` allachan at au1 dot ibm.com 2014-06-13 14:54 ` fweimer at redhat dot com 2014-06-27 14:00 ` fweimer at redhat dot com 2021-02-10 19:30 ` bnnf-yellowbot at blurcompany dot com 2021-03-05 15:27 ` bnnf at yahoo dot com 2021-09-15 2:40 ` namboru at jasaseo dot one 2023-07-18 11:44 ` vincent-srcware at vinc17 dot net 2023-07-18 12:01 ` vincent-srcware at vinc17 dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-12701-131-C5uH69LBnY@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).