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/14888] New: Inconsistent (and wrong, according to POSIX) space handling in strptime


http://sourceware.org/bugzilla/show_bug.cgi?id=14888

             Bug #: 14888
           Summary: Inconsistent (and wrong, according to POSIX) space
                    handling in strptime
           Product: glibc
           Version: 2.16
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: allachan@au1.ibm.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


There are a number of places in __strptime_internal where the following code
can be seen to skip whitespace:

    while (*rp == ' ')
        ++rp;

And there are other places where it used the ISSPACE macro, which eventually
resolves down the the ISO-C isspace macro.

I believe the former case is incorrect since POSIX clearly defines whitespace
in the strptime docs to be "as specified by isspace()".

Hence checking only for the space character is incorrect.

-- 
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]