diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-17 13:07:56 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-20 10:18:32 +1000 |
commit | 88ce406c895acf8d310835c3af628542364d8129 (patch) | |
tree | fb6c75b36b7ce1c596252a508bfae3bc1833cc15 /ssl/ssl_rsa.c | |
parent | 8f586f5bc10f86a064c74f06542b9da6cf137cc6 (diff) |
ssl: coverity 1465527 - dereference after null check
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14589)
Diffstat (limited to 'ssl/ssl_rsa.c')
-rw-r--r-- | ssl/ssl_rsa.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index b78d751818..cf410d6d87 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -424,6 +424,9 @@ static int use_certificate_chain_file(SSL_CTX *ctx, SSL *ssl, const char *file) void *passwd_callback_userdata; SSL_CTX *real_ctx = (ssl == NULL) ? ctx : ssl->ctx; + if (ctx == NULL && ssl == NULL) + return 0; + ERR_clear_error(); /* clear error stack for * SSL_CTX_use_certificate() */ |