1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 08:38:49 -05:00

altsvc_out: check the return code from Curl_gmtime

Pointed out by Coverity, CID 1442956.

Closes #3640
This commit is contained in:
Daniel Stenberg 2019-03-03 17:37:29 +01:00
parent 98441f3586
commit 2591a491aa
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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 "