diff options
author | Crist J. Clark <cjc@FreeBSD.org> | 2002-03-18 09:49:18 +0000 |
---|---|---|
committer | Crist J. Clark <cjc@FreeBSD.org> | 2002-03-18 09:49:18 +0000 |
commit | e693d3803c4842c3c831ba8687f60448209d4786 (patch) | |
tree | b113ceeebb04eea702f1655b5e6076b0053f33cb /chpass/util.c | |
parent | f51ea5a6dc09ca726b14a65d08ee2496cb81c117 (diff) | |
download | pw-darwin-e693d3803c4842c3c831ba8687f60448209d4786.tar.gz pw-darwin-e693d3803c4842c3c831ba8687f60448209d4786.tar.zst pw-darwin-e693d3803c4842c3c831ba8687f60448209d4786.zip |
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 <mpp@mpp.pro-ns.net>
MFC after: 3 days
Diffstat (limited to 'chpass/util.c')
-rw-r--r-- | chpass/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |