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:
parent
16e9a9eaef
commit
c0d448f778
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user