From e693d3803c4842c3c831ba8687f60448209d4786 Mon Sep 17 00:00:00 2001 From: "Crist J. Clark" Date: Mon, 18 Mar 2002 09:49:18 +0000 Subject: Fix a bug that prevents "00" being used as a valid year. Why bother in 2002? It is a bug. Might as well close the PR. PR: misc/14511 Submitted by: Mike Pritchard MFC after: 3 days --- chpass/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chpass/util.c') diff --git a/chpass/util.c b/chpass/util.c index e7dd06b..2bfde62 100644 --- a/chpass/util.c +++ b/chpass/util.c @@ -113,7 +113,7 @@ atot(p, store) if (!(t = strtok((char *)NULL, " \t,")) || !isdigit(*t)) goto bad; year = atoi(t); - if (day < 1 || day > 31 || month < 1 || month > 12 || !year) + if (day < 1 || day > 31 || month < 1 || month > 12) goto bad; /* Allow two digit years 1969-2068 */ if (year < 69) -- cgit v1.2.3-56-ge451