diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:25:15 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 10:25:15 -0500 |
commit | 6b5b1a02d46f761b691527c8e3c9a2ad08b0c3a5 (patch) | |
tree | f512b638fb500365ec3ae3b86e149e5acda7dc9a /src/common/tortls.c | |
parent | 2e99371eb9886559814c3c8b7e4ba52e474bb520 (diff) | |
download | tor-6b5b1a02d46f761b691527c8e3c9a2ad08b0c3a5.tar.gz tor-6b5b1a02d46f761b691527c8e3c9a2ad08b0c3a5.zip |
Fix a coverity NULL-pointer deref warning in the tortls tests.
Also, make our cert validation code more NULL-resistant.
This is CID 1327891.
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index a1facec409..5e0c97096d 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -884,7 +884,7 @@ tor_tls_cert_is_valid(int severity, EVP_PKEY *cert_key; int r, key_ok = 0; - if (!signing_cert) + if (!signing_cert || !cert) goto bad; EVP_PKEY *signing_key = X509_get_pubkey(signing_cert->cert); |