diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-11-28 15:27:58 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-11-29 11:01:24 +0100 |
commit | 0044443a020d15c262e9f6c724b29365a8148437 (patch) | |
tree | f345ffb8bf4a275caa823b758ccac35bbf6f3526 /lib/altsvc.c | |
parent | bc64377ff8386d4f809806b6286f43e5aff19922 (diff) |
parsedate: offer a getdate_capped() alternative
... and use internally. This function will return TIME_T_MAX instead of
failure if the parsed data is found to be larger than what can be
represented. TIME_T_MAX being the largest value curl can represent.
Reviewed-by: Daniel Gustafsson
Reported-by: JanB on github
Fixes #4152
Closes #4651
Diffstat (limited to 'lib/altsvc.c')
-rw-r--r-- | lib/altsvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/altsvc.c b/lib/altsvc.c index c3dbb708a..28c9276b1 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -161,7 +161,7 @@ static CURLcode altsvc_add(struct altsvcinfo *asi, char *line) date, &persist, &prio); if(9 == rc) { struct altsvc *as; - time_t expires = curl_getdate(date, NULL); + time_t expires = Curl_getdate_capped(date); as = altsvc_create(srchost, dsthost, srcalpn, dstalpn, srcport, dstport); if(as) { as->expires = expires; |