1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

if gmtime() returns NULL, this returns -1 to bail out nicely

This commit is contained in:
Daniel Stenberg 2004-11-29 08:10:10 +00:00
parent 16e9a9eaef
commit c0d448f778

View File

@ -381,6 +381,8 @@ static time_t Curl_parsedate(const char *date)
#else
gmt = gmtime(&t); /* use gmtime_r() if available */
#endif
if(!gmt)
return -1; /* illegal date/time */
t2 = mktime(gmt);