From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 11 20:00:22 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5830116A426 for ; Sat, 11 Feb 2006 20:00:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FF5A43D45 for ; Sat, 11 Feb 2006 20:00:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1BK0LUc005509 for ; Sat, 11 Feb 2006 20:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1BK0LJU005508; Sat, 11 Feb 2006 20:00:21 GMT (envelope-from gnats) Resent-Date: Sat, 11 Feb 2006 20:00:21 GMT Resent-Message-Id: <200602112000.k1BK0LJU005508@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Andreas S. Wetzel" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D1D216A420 for ; Sat, 11 Feb 2006 19:57:06 +0000 (GMT) (envelope-from mickey@enforcer.cc) Received: from mail-in-01.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1675343D45 for ; Sat, 11 Feb 2006 19:57:05 +0000 (GMT) (envelope-from mickey@enforcer.cc) Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id DCBAB12E335 for ; Sat, 11 Feb 2006 20:57:03 +0100 (CET) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id C24A6B15A6 for ; Sat, 11 Feb 2006 20:57:03 +0100 (CET) Received: from mail.enforcer.cc (dslb-084-059-007-197.pools.arcor-ip.net [84.59.7.197]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 6E31B1B669F for ; Sat, 11 Feb 2006 20:56:55 +0100 (CET) Received: from mickey by mail.enforcer.cc with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1F80rW-000FPO-Al for FreeBSD-gnats-submit@freebsd.org; Sat, 11 Feb 2006 20:56:54 +0100 Message-Id: Date: Sat, 11 Feb 2006 20:56:54 +0100 From: "Andreas S. Wetzel" Sender: "Andreas S. Wetzel" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/93197: strptime(3) succeeds on formats it should fail on X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Andreas S. Wetzel" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Feb 2006 20:00:22 -0000 >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 #include 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: