diff options
author | Peter Wemm <peter@FreeBSD.org> | 2004-08-24 00:15:37 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 2004-08-24 00:15:37 +0000 |
commit | ee4dc2a402382866ff0b8e66da867bbd6609304e (patch) | |
tree | 718e1bccef2b0a5b4b39e8a60628dbe977f7939d /lib/libc/stdtime | |
parent | 95929b661e02ea2bee9de8b65c69c5e9222475e4 (diff) |
Notes
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r-- | lib/libc/stdtime/localtime.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c index 9efff47a8af3..d7b5a3636aaa 100644 --- a/lib/libc/stdtime/localtime.c +++ b/lib/libc/stdtime/localtime.c @@ -1487,6 +1487,9 @@ const int do_norm_secs; } if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE)) return WRONG; + /* Don't go below 1900 for POLA */ + if (yourtm.tm_year < 0) + return WRONG; if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN) saved_seconds = 0; else if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) { |