mirror of
https://github.com/curl/curl.git
synced 2024-12-03 06:20:31 +08:00
gtls: dereferencing NULL pointer
Coverity CID 1291165 pointed out 'chainp' could be dereferenced when NULL if gnutls_certificate_get_peers() had previously failed.
This commit is contained in:
parent
5f6f9e8b59
commit
fea13a17d8
@ -838,7 +838,7 @@ gtls_connect_step3(struct connectdata *conn,
|
||||
infof(data, "\t common name: WARNING couldn't obtain\n");
|
||||
}
|
||||
|
||||
if(data->set.ssl.certinfo) {
|
||||
if(data->set.ssl.certinfo && chainp) {
|
||||
unsigned int i;
|
||||
|
||||
result = Curl_ssl_init_certinfo(data, cert_list_size);
|
||||
|
Loading…
Reference in New Issue
Block a user