mirror of
https://github.com/curl/curl.git
synced 2026-07-08 06:07:15 +03:00
if gmtime() returns NULL, this returns -1 to bail out nicely
This commit is contained in:
parent
16e9a9eaef
commit
c0d448f778
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue