New bug introduced in strptime (was Re: svn commit: r272273 - head/lib/libc/stdtime)

Andrey Chernov ache at freebsd.org
Wed Oct 1 22:05:38 UTC 2014


On 02.10.2014 0:02, Pedro Giffuni wrote:
> Hello;
> 
> I can reproduce this. On FreeBSD 9.1 (no patch):

It was the bug in the original patch. I just miss it. Fix attached.

-- 
http://ache.vniz.net/
-------------- next part --------------
--- strptime.c.bak	2014-10-02 01:44:39.000000000 +0400
+++ strptime.c	2014-10-02 01:59:20.000000000 +0400
@@ -342,6 +342,7 @@
 			if (i == asizeof(tptr->weekday))
 				return (NULL);
 
+			buf += len;
 			tm->tm_wday = i;
 			flags |= FLAG_WDAY;
 			break;


More information about the svn-src-head mailing list