From 92b19a5754b6f5129888b0d1754224e8d415f816 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 --- usr.bin/chpass/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index e7dd06b6db88..2bfde6238803 100644 --- a/usr.bin/chpass/util.c +++ b/usr.bin/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