From: Daniel Stenberg Date: Sun, 3 Mar 2019 16:37:29 +0000 (+0100) Subject: altsvc_out: check the return code from Curl_gmtime X-Git-Tag: curl-7_64_1~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2591a491aa7cc736dc1751b7b1a4502eac5edf9e;p=thirdparty%2Fcurl.git altsvc_out: check the return code from Curl_gmtime Pointed out by Coverity, CID 1442956. Closes #3640 --- diff --git a/lib/altsvc.c b/lib/altsvc.c index 97cdc7b8a7..64ca2655de 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 "