This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12701] scanf accepts non-matching input
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 3 May 2011 00:40:28 +0000
- Subject: [Bug libc/12701] scanf accepts non-matching input
- Auto-submitted: auto-generated
- References: <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 #4 from Rich Felker <bugdal at aerifal dot cx> 2011-05-03 00:40:26 UTC ---
Yes I understand pushbacks.
Scanning "0xz" for %x results in an input item of "0x" with "z" pushed back
into the unread buffer. The bug has nothing to do with pushbacks, because the
right data is pushed back. The bug is that a non-matching input item is treated
as a match rather than a matching error.
Perhaps you thought I was saying the input item should be "0", successfully
converted, with "x" as the next unread character in the buffer. Of course this
is wrong and I do not believe such a thing.
Perhaps you should try reading the actual language standard rather than
assuming you're right.
--
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.