Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 1999 15:17:40 -0400
From:      scott <scott@chronis.pobox.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: strptime bug?
Message-ID:  <19990922151740.A6478@chronis.pobox.com>
In-Reply-To: <19990922132333.A1517@chronis.pobox.com>
References:  <19990922113633.A15733@chronis.pobox.com> <15664.938019529@axl.noc.iafrica.com> <19990922132333.A1517@chronis.pobox.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii

For a description of the problem see rest of thread.  I've attached a
patch which is running well on my system, and will send in a PR as
well.

scott


--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="strptime.patch"

170c170,171
< 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
---
> 			len = 0;
> 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf) && len < 3; buf++) {
172a174
> 				len++;
187,188c189,190
< 
< 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
---
> 			len = 0;
> 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf) && len < 2; buf++) {
190a193
> 				len++;
211,212c214,215
< 
< 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
---
> 			len = 0;
> 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf) && len < 2; buf++) {
214a218
> 				len++;
278,279c282,283
< 
< 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
---
> 			len = 0;
> 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf) && len < 2; buf++) {
281a286
> 				len++;
319,320c324,325
< 
< 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
---
> 			len = 0;
> 			for (i = 0; *buf != 0 && isdigit((unsigned char)*buf) && len < 2; buf++) {
322a328
> 				len++;
341a348
> 			len = 0;
344a352,356
> 				if ((c == 'y' && len >= 1) || (c == 'Y' && len >= 3)) {
> 					buf++;
> 					break;
> 				}
> 				len++;

--fUYQa+Pmc3FrFX/N--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990922151740.A6478>