From owner-freebsd-stable Wed Sep 22 12:17:51 1999 Delivered-To: freebsd-stable@freebsd.org Received: from chronis.pobox.com (chronis.pobox.com [208.210.124.49]) by hub.freebsd.org (Postfix) with ESMTP id C031815DED for ; Wed, 22 Sep 1999 12:17:43 -0700 (PDT) (envelope-from scott@chronis.pobox.com) Received: by chronis.pobox.com (Postfix, from userid 1001) id A29B19B46; Wed, 22 Sep 1999 15:17:40 -0400 (EDT) Date: Wed, 22 Sep 1999 15:17:40 -0400 From: scott To: freebsd-stable@freebsd.org Subject: Re: strptime bug? Message-ID: <19990922151740.A6478@chronis.pobox.com> Mail-Followup-To: freebsd-stable@freebsd.org References: <19990922113633.A15733@chronis.pobox.com> <15664.938019529@axl.noc.iafrica.com> <19990922132333.A1517@chronis.pobox.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" X-Mailer: Mutt 0.95.7i In-Reply-To: <19990922132333.A1517@chronis.pobox.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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