summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-09-10 09:22:40 +0200
committerShane Lontis <shane.lontis@oracle.com>2020-09-12 07:57:23 +0200
commit6e417f951c64f4643cdc62c370badf46d5fe485e (patch)
tree12911910cd502cced849d73b9915b2aa9508e144 /crypto/store
parentFix coverity issue: CID 1466486 - Resource leak in OSSL_STORE (diff)
downloadopenssl-6e417f951c64f4643cdc62c370badf46d5fe485e.tar.xz
openssl-6e417f951c64f4643cdc62c370badf46d5fe485e.zip
Fix coverity issue: CID 1466485 - Explicit NULL dereference in OSSL_STORE_find()
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/12847)
Diffstat (limited to 'crypto/store')
-rw-r--r--crypto/store/store_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/store/store_lib.c b/crypto/store/store_lib.c
index 98e49d826d..8cf051818c 100644
--- a/crypto/store/store_lib.c
+++ b/crypto/store/store_lib.c
@@ -272,6 +272,10 @@ int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search)
ERR_raise(ERR_LIB_OSSL_STORE, OSSL_STORE_R_LOADING_STARTED);
return 0;
}
+ if (search == NULL) {
+ ERR_raise(ERR_LIB_OSSL_STORE, ERR_R_PASSED_NULL_PARAMETER);
+ return 0;
+ }
if (ctx->fetched_loader != NULL) {
OSSL_PARAM_BLD *bld;