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
Родитель 16e9a9eaef
Коммит c0d448f778
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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);