From 2591a491aa7cc736dc1751b7b1a4502eac5edf9e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 3 Mar 2019 17:37:29 +0100 Subject: altsvc_out: check the return code from Curl_gmtime Pointed out by Coverity, CID 1442956. Closes #3640 --- lib/altsvc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/altsvc.c') 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 " -- cgit v1.2.3