mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
openssl: get_cert_chain: fix NULL dereference
CID 1361815: Explicit null dereferenced (FORWARD_NULL)
This commit is contained in:
parent
8132fe11b3
commit
675c30abc2
@ -2550,9 +2550,11 @@ static CURLcode get_cert_chain(struct connectdata *conn,
|
||||
EVP_PKEY_free(pubkey);
|
||||
}
|
||||
|
||||
for(j = 0; j < psig->length; j++)
|
||||
BIO_printf(mem, "%02x:", psig->data[j]);
|
||||
push_certinfo("Signature", i);
|
||||
if(psig) {
|
||||
for(j = 0; j < psig->length; j++)
|
||||
BIO_printf(mem, "%02x:", psig->data[j]);
|
||||
push_certinfo("Signature", i);
|
||||
}
|
||||
|
||||
PEM_write_bio_X509(mem, x);
|
||||
push_certinfo("Cert", i);
|
||||
|
Loading…
Reference in New Issue
Block a user