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/13389] scanf "%0s"


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.


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