projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05ead00
)
Fix coverity CID #1465594 - Null dereference in EVP_PKEY_get0()
author
Shane Lontis
<shane.lontis@oracle.com>
Tue, 11 Aug 2020 05:03:42 +0000
(15:03 +1000)
committer
Shane Lontis
<shane.lontis@oracle.com>
Mon, 24 Aug 2020 01:19:28 +0000
(11:19 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12628)
crypto/evp/p_lib.c
patch
|
blob
|
history
diff --git
a/crypto/evp/p_lib.c
b/crypto/evp/p_lib.c
index 7a798167880ef1c78aa628e308fd1c034b1fa291..503009dd931e458d6160dbf99609aad7c690f6ad 100644
(file)
--- a/
crypto/evp/p_lib.c
+++ b/
crypto/evp/p_lib.c
@@
-720,6
+720,8
@@
int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
void *EVP_PKEY_get0(const EVP_PKEY *pkey)
{
+ if (pkey == NULL)
+ return NULL;
if (!evp_pkey_downgrade((EVP_PKEY *)pkey)) {
ERR_raise(ERR_LIB_EVP, EVP_R_INACCESSIBLE_KEY);
return NULL;