From: Ulrich Drepper Date: Thu, 4 Apr 2002 01:20:17 +0000 (+0000) Subject: (__mktime_internal): Check for year < 70. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=185fbd6b4b6cfdafb3ad628b56376ef75ec61004;p=thirdparty%2Fglibc.git (__mktime_internal): Check for year < 70. --- diff --git a/time/mktime.c b/time/mktime.c index 5f3f3f23f81..50ab06aba85 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -246,6 +246,10 @@ __mktime_internal (struct tm *tp, int mon_years = mon / 12 - negative_mon_remainder; int year = year_requested + mon_years; + /* Only years after 1970 are defined. */ + if (year < 70) + return -1; + /* The other values need not be in range: the remaining code handles minor overflows correctly, assuming int and time_t arithmetic wraps around.