diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-11-29 08:10:10 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-11-29 08:10:10 +0000 |
commit | c0d448f7783638354a7bb981e40dde0af4e8ad9d (patch) | |
tree | 74d56972a7c16d130c257221b5bedf24ae045a48 /lib | |
parent | 16e9a9eaef9201ac1c09c2a7c64f6ac0ad09edb8 (diff) |
if gmtime() returns NULL, this returns -1 to bail out nicely
Diffstat (limited to 'lib')
-rw-r--r-- | lib/parsedate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c index e9e860fe6..e3637ee75 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -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); |