]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__mktime_internal): Check for year < 70.
authorUlrich Drepper <drepper@redhat.com>
Thu, 4 Apr 2002 01:20:17 +0000 (01:20 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 4 Apr 2002 01:20:17 +0000 (01:20 +0000)
time/mktime.c

index 5f3f3f23f8196e81472f47c2f1dcfb1446d364b5..50ab06aba852a53c379a88970017d22622dca544 100644 (file)
@@ -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.