This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13389] scanf "%0s"
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Sun, 06 Nov 2011 07:17:14 +0000
- Subject: [Bug libc/13389] scanf "%0s"
- Auto-submitted: auto-generated
- References: <bug-13389-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13389
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugdal at aerifal dot cx
Resolution| |INVALID
--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> 2011-11-06 07:17:14 UTC ---
Not a bug. The test case invokes undefined behavior by violating the
constraints of the scanf function. Per the ISO C standard, 7.19.6.2 (ALL CAPS
added by yours truly for emphasis):
Each conversion specification is introduced by the character %. After the %,
the following appear in sequence:
- An optional assignment-suppressing character *.
- An optional decimal integer GREATER THAN ZERO that specifies the maximum
field width (in characters).
- An optional length modifier that specifies the size of the receiving object.
- A conversion specifier character that specifies the type of conversion to be
applied.
--
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.