Author: yuripv Date: Sat Oct 13 16:25:28 2018 New Revision: 339346 URL: https://svnweb.freebsd.org/changeset/base/339346
Log: strptime: disallow zero hour for %I (defined by POSIX as [01,12]) and %l (extension, defined in strftime(3) as 1-12). Approved by: re (gjb), kib (mentor) Differential Revision: https://reviews.freebsd.org/D17543 Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c ============================================================================== --- head/lib/libc/stdtime/strptime.c Sat Oct 13 03:12:57 2018 (r339345) +++ head/lib/libc/stdtime/strptime.c Sat Oct 13 16:25:28 2018 (r339346) @@ -291,7 +291,7 @@ label: if (c == 'H' || c == 'k') { if (i > 23) return (NULL); - } else if (i > 12) + } else if (i == 0 || i > 12) return (NULL); tm->tm_hour = i; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"