cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Bug "fix" for Curl_parsedate() in parsedate.c

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 11 Nov 2004 10:55:55 +0100 (CET)

On Wed, 10 Nov 2004, Jeff Phillips wrote:

> This function caused a crash when a cookie had an expiration date of "Tue,
> 29-Nov-2072 08:28:22 GMT". The crash happened in the call to mktime() at
> line 380. While the ultimate solution to this problem may be to use 64-bit
> dates, I'm not sure how well they're implemented on Unix or Linux platforms.
> For now, here's a more convenient hack to parsedate.c:

Thanks for pointing this out.

I did a slightly different fix. I made it return 0x7fffffff on this case if
time_t is 32 bit.

Committed to CVS just now.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-11-11