diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-10-21 16:01:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-10-21 16:01:29 -0400 |
commit | 5e9f2384cf0f97646d7ee1b9eccaab4dfe382536 (patch) | |
tree | 3dfcc13eca3649fc3a9a55cc915f1e7fb1f6fecc /src/common | |
parent | bebf6c6c676e9d8df73743b2619bda23a59c54df (diff) | |
download | tor-5e9f2384cf0f97646d7ee1b9eccaab4dfe382536.tar.gz tor-5e9f2384cf0f97646d7ee1b9eccaab4dfe382536.zip |
Fix various coverity-found issues
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index 2a2a5d7fd1..1057cf40f0 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -891,9 +891,12 @@ tor_tls_cert_is_valid(int severity, { check_no_tls_errors(); EVP_PKEY *cert_key; - EVP_PKEY *signing_key = X509_get_pubkey(signing_cert->cert); int r, key_ok = 0; + if (!signing_cert) + goto bad; + + EVP_PKEY *signing_key = X509_get_pubkey(signing_cert->cert); if (!signing_key) goto bad; r = X509_verify(cert->cert, signing_key); |