diff options
author | cjc <cjc@FreeBSD.org> | 2002-03-18 09:49:18 +0000 |
---|---|---|
committer | cjc <cjc@FreeBSD.org> | 2002-03-18 09:49:18 +0000 |
commit | 2e2afe2675da81a967a0e183c832cf63ac46d9d5 (patch) | |
tree | d6324f1ecfb725e8ebfc892dcf458c53e910ba36 | |
parent | f536d056a3d7dc5908bbb24a4ce7a51e1ea13ce3 (diff) | |
download | FreeBSD-src-2e2afe2675da81a967a0e183c832cf63ac46d9d5.zip FreeBSD-src-2e2afe2675da81a967a0e183c832cf63ac46d9d5.tar.gz |
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
-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 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) |