This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12701] scanf accepts non-matching input


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]