mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-25 07:49:38 +03:00
Curl fetcher: Guard against read of uninitialised value.
Fixes Coverity issue: CID 1419830: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "buf[depth]".
This commit is contained in:
parent
63dd59bd2e
commit
0140d1e5b1
@ -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]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user