From owner-freebsd-audit Sun Jun 24 23:30:16 2001 Delivered-To: freebsd-audit@freebsd.org Received: from smtp.www-service.de (smtp.www-service.de [212.77.161.16]) by hub.freebsd.org (Postfix) with SMTP id 7ED5137B406 for ; Sun, 24 Jun 2001 23:30:11 -0700 (PDT) (envelope-from thz@Lennartz-electronic.de) Received: (qmail 9507 invoked from network); 25 Jun 2001 06:30:08 -0000 Received: from pd90065a0.dip.t-dialin.net (HELO fw.tue.le) (217.0.101.160) by smtp.www-service.de with SMTP; 25 Jun 2001 06:30:08 -0000 Received: from mezcal.tue.le (mezcal.tue.le [192.168.201.20]) by fw.tue.le (8.8.8/8.8.8) with ESMTP id IAA05104 for ; Mon, 25 Jun 2001 08:29:56 +0200 (CEST) (envelope-from thz@mezcal.tue.le) Received: (from thz@localhost) by mezcal.tue.le (8.11.3/8.11.3) id f5P6Tt421502 for audit@freebsd.org; Mon, 25 Jun 2001 08:29:55 +0200 (CEST) (envelope-from thz) Date: Mon, 25 Jun 2001 08:22:17 +0200 From: Thomas Zenker To: audit@freebsd.org Subject: Re: bin/27029: strptime: %s formatting missing (patch) Message-ID: <20010625082217.A21418@mezcal.tue.le> References: <200106250228.f5P2Sik45523@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106250228.f5P2Sik45523@freefall.freebsd.org>; from dd@FreeBSD.org on Sun, Jun 24, 2001 at 07:28:44PM -0700 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 24, 2001 at 07:28:44PM -0700, dd@FreeBSD.org wrote: > Synopsis: strptime: %s formatting missing (patch) > > State-Changed-From-To: open->feedback > State-Changed-By: dd > State-Changed-When: Sun Jun 24 19:28:08 PDT 2001 > State-Changed-Why: > The patch looks pretty good; however, could you please send it to > audit@freebsd.org for further review? > > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27029 Hello, I have this patch running in our production software since half a year and not encountered problems. It applies to current also (at least when I revised it last time). -- Thomas Zenker c/o Lennartz electronic GmbH Bismarckstrasse 136, D-72072 Tuebingen, Germany Phone: +49-(0)7071-93550 Email: thz@lennartz-electronic.de --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-strptime Index: lib/libc/stdtime/strptime.c =================================================================== RCS file: /usr/cvs/FreeBSD/src/lib/libc/stdtime/strptime.c,v retrieving revision 1.17.2.1 diff -u -r1.17.2.1 strptime.c --- lib/libc/stdtime/strptime.c 2000/10/26 16:07:53 1.17.2.1 +++ lib/libc/stdtime/strptime.c 2001/04/27 19:38:51 @@ -513,6 +513,16 @@ } } break; + case 's': + { + time_t t; + const char *cp; + t = strtol(buf, &cp, 10); + buf = cp; + memcpy(tm, gmtime(&t), sizeof(struct tm)); + got_GMT = 1; + } + break; } } return (char *)buf; --LQksG6bCIzRHxTLp-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message