Date: Sat, 11 Feb 2006 20:56:54 +0100 From: "Andreas S. Wetzel" <mickey242@gmx.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/93197: strptime(3) succeeds on formats it should fail on Message-ID: <E1F80rW-000FPO-Al@mail.enforcer.cc> Resent-Message-ID: <200602112000.k1BK0LJU005508@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 93197 >Category: bin >Synopsis: strptime(3) succeeds on formats it should fail on >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Feb 11 20:00:20 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Andreas S. Wetzel >Release: FreeBSD 6.0-RELEASE i386 >Organization: >Environment: System: FreeBSD transrapid.enforcer.cc 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Jan 5 18:34:54 CET 2006 root@transrapid.enforcer.cc:/usr/src/sys/i386/compile/TRANSRAPID i386 >Description: The strptime(3) function succeeds with input that it should fail on according to the given format string. Excerpt from the strptime(3) manpage: It returns NULL if one of the conversions failed. >How-To-Repeat: Compile and run this test program. strptime() should obviously fail on input 'March' cause format '%d' is not satisfied. #include <stdio.h> #include <time.h> int main(int argc, char *argv[]) { struct tm tm; char *date="March"; char *test=strptime(date, "%B %d", &tm); if(test) printf("Broken\n"); else printf("OK\n"); return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1F80rW-000FPO-Al>