if gmtime() returns NULL, this returns -1 to bail out nicely
This commit is contained in:
@@ -381,6 +381,8 @@ static time_t Curl_parsedate(const char *date)
|
|||||||
#else
|
#else
|
||||||
gmt = gmtime(&t); /* use gmtime_r() if available */
|
gmt = gmtime(&t); /* use gmtime_r() if available */
|
||||||
#endif
|
#endif
|
||||||
|
if(!gmt)
|
||||||
|
return -1; /* illegal date/time */
|
||||||
|
|
||||||
t2 = mktime(gmt);
|
t2 = mktime(gmt);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user