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 | 92b19a5754b6f5129888b0d1754224e8d415f816 (patch) | |
tree | d6324f1ecfb725e8ebfc892dcf458c53e910ba36 /usr.bin | |
parent | bbb467cd9ad65413bbe976eae19f7a0d5d5aaa9b (diff) | |
download | src-92b19a5754b6f5129888b0d1754224e8d415f816.tar.gz src-92b19a5754b6f5129888b0d1754224e8d415f816.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
Notes
Notes:
svn path=/head/; revision=92554
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/chpass/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |