diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2020-02-24 14:58:16 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2020-02-24 14:58:16 +0000 |
commit | 0140d1e5b11c4117c6a2f1b565c8debacbae3a4d (patch) | |
tree | 839dd68f6508c56777f37749b45ccf1b8098db46 /content/fetchers | |
parent | 63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce (diff) | |
download | netsurf-0140d1e5b11c4117c6a2f1b565c8debacbae3a4d.tar.gz netsurf-0140d1e5b11c4117c6a2f1b565c8debacbae3a4d.tar.bz2 |
Curl fetcher: Guard against read of uninitialised value.
Fixes Coverity issue:
CID 1419830: Memory - illegal accesses (UNINIT)
>>> Using uninitialized value "buf[depth]".
Diffstat (limited to 'content/fetchers')
-rw-r--r-- | content/fetchers/curl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c index bd8c4333c..525c15885 100644 --- a/content/fetchers/curl.c +++ b/content/fetchers/curl.c @@ -676,6 +676,9 @@ fetch_curl_store_certs_in_cache(struct curl_fetch_info *f) /* release the openssl memory buffer */ for (depth = 0; depth < chain.depth; depth++) { + if (chain.certs[depth].err == SSL_CERT_ERR_CERT_MISSING) { + continue; + } if (buf[depth] != NULL) { BUF_MEM_free(buf[depth]); } |