Date: Mon, 25 Jun 2001 08:22:17 +0200 From: Thomas Zenker <thz@Lennartz-electronic.de> To: audit@freebsd.org Subject: Re: bin/27029: strptime: %s formatting missing (patch) Message-ID: <20010625082217.A21418@mezcal.tue.le> In-Reply-To: <200106250228.f5P2Sik45523@freefall.freebsd.org>; from dd@FreeBSD.org on Sun, Jun 24, 2001 at 07:28:44PM -0700 References: <200106250228.f5P2Sik45523@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010625082217.A21418>