From 2e2afe2675da81a967a0e183c832cf63ac46d9d5 Mon Sep 17 00:00:00 2001 From: cjc 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/chpass/util.c') diff --git a/usr.bin/chpass/util.c b/usr.bin/chpass/util.c index e7dd06b..2bfde62 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.1