Summary: | [libc] [patch] strptime() accepts formats that should be rejected | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Fabian Keil <fk> | ||||
Component: | standards | Assignee: | Pedro F. Giffuni <pfg> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Unspecified | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Fabian Keil
2012-11-06 14:30:00 UTC
The change was included as part of r173421 A commit references this bug: Author: pfg Date: Mon Jun 30 14:52:41 UTC 2014 New revision: 268043 URL: http://svnweb.freebsd.org/changeset/base/268043 Log: MFC r267627: strptime: add support for %t and %n Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless. We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2) Changes: _U stable/10/ stable/10/lib/libc/stdtime/strptime.c A commit references this bug: Author: pfg Date: Sat Jul 12 18:44:47 UTC 2014 New revision: 268574 URL: http://svnweb.freebsd.org/changeset/base/268574 Log: MFC r267627: strptime: add support for %t and %n Posix strptime() requires support for %t and %n, which were added to the illumos port. Curiously we were skipping white spaces by default in most other cases making %t meaningless. We now skip spaces in the case of the %e specifier as strftime(3) explicitly adds a space for the single digit case. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html PR: 173421 Obtained from: Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2) Changes: _U stable/9/lib/libc/ _U stable/9/lib/libc/stdtime/ stable/9/lib/libc/stdtime/strptime.c Fixed: FWIW, I noticed that Apple's libc has a similar (but not identical) fix. |