aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-03 17:37:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-03 21:30:31 +0100
commit2591a491aa7cc736dc1751b7b1a4502eac5edf9e (patch)
tree79a67b5cb813d30f23b980564f93e8d8d75bb31e /lib
parent98441f35864f13470134d3473d680b8c6c60a98e (diff)
altsvc_out: check the return code from Curl_gmtime
Pointed out by Coverity, CID 1442956. Closes #3640
Diffstat (limited to 'lib')
-rw-r--r--lib/altsvc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/altsvc.c b/lib/altsvc.c
index 97cdc7b8a..64ca2655d 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -216,7 +216,9 @@ static CURLcode altsvc_load(struct altsvcinfo *asi, const char *file)
static CURLcode altsvc_out(struct altsvc *as, FILE *fp)
{
struct tm stamp;
- Curl_gmtime(as->expires, &stamp);
+ CURLcode result = Curl_gmtime(as->expires, &stamp);
+ if(result)
+ return result;
fprintf(fp,
"%s %s %u "