diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-03-21 16:47:22 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-03-21 16:53:23 +0100 |
commit | fea13a17d849e6db94c553811423aa98017a2c77 (patch) | |
tree | 88e1c2a6ba61cc2bd333f45f0363c15e4f0adca0 | |
parent | 5f6f9e8b590008c476a66eb5ff3377446b1caad6 (diff) |
gtls: dereferencing NULL pointer
Coverity CID 1291165 pointed out 'chainp' could be dereferenced when
NULL if gnutls_certificate_get_peers() had previously failed.
-rw-r--r-- | lib/vtls/gtls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index d6293e506..82c09bc80 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -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); |