mirror of
https://github.com/curl/curl.git
synced 2025-04-12 16:20:35 +08: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…
x
Reference in New Issue
Block a user