cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Jeff Phillips <jeff_at_seasideresearch.com>
Date: Wed, 10 Nov 2004 22:26:03 -0800

Fellow libcurl users,

 

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:

 

353,356d352

< /* hack for 32-bit time_t date limitation */

< if (yearnum > 2037)

< yearnum = 2037;

<

 

Take care,

Jeff Phillips

 
Received on 2004-11-11