From: serassio <> Date: Sun, 24 Dec 2006 22:29:43 +0000 (+0000) Subject: Accept large dates >2^31. Seen for example in the Google logo. X-Git-Tag: SQUID_3_0_PRE6~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=318114796e8d2aa57b9396bd47030c4e251e8481;p=thirdparty%2Fsquid.git Accept large dates >2^31. Seen for example in the Google logo. Forward port of 2.6 patch. --- diff --git a/lib/rfc1123.c b/lib/rfc1123.c index 75ee9f6e7c..eb26f7be83 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1123.c,v 1.38 2006/01/22 17:12:52 serassio Exp $ + * $Id: rfc1123.c,v 1.39 2006/12/24 15:29:43 serassio Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -117,9 +117,7 @@ tmSaneValues(struct tm *tm) return 0; if (tm->tm_mon < 0 || tm->tm_mon > 11) return 0; - if (tm->tm_year < 70 || tm->tm_year > 120) - return 0; - return 1; + return mktime(tm) != -1; } static struct tm *