Commit c0d448f7 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

if gmtime() returns NULL, this returns -1 to bail out nicely

parent 16e9a9ea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);