Date: Fri, 15 Jan 1999 16:25:12 +1100 From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/9504: fetch(1) is not Y2K compliant Message-ID: <99Jan15.162432est.40342@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
>Number: 9504
>Category: bin
>Synopsis: fetch(1) is not Y2K compliant
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 14 21:30:02 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Peter Jeremy
>Release: FreeBSD 3.0-CURRENT i386
>Organization:
Alcatel Australia
>Environment:
>Description:
Fetch(1) assumes that the http data read is the number of years since
1900.
>How-To-Repeat:
Code inspection
>Fix:
--- /3.0/src/usr.bin/fetch/http.c Wed Dec 9 00:00:49 1998
+++ ./http.c Fri Jan 15 14:46:37 1999
@@ -1408,6 +1408,12 @@
mname, mname + 1, mname + 2, &tm.tm_year,
&tm.tm_hour, &tm.tm_min, &tm.tm_sec) != 8)
return -1;
+ /* take years 00 to 69 as 20xx and allow 4-digit years */
+ if (ym.ym_year < 70)
+ ym.ym_year += 100;
+ else if (ym.ym_year > 1899)
+ ym.ym_year -= 1900;
+
for (i = 0; i < 12; i++) {
if (strcasecmp(months[i], mname))
break;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jan15.162432est.40342>
