The branch master has been updated
via dc7e42c6a12637bae1660561d3f4cef039001475 (commit)
from 946bc0e3ec19ca019fcfa95f93c37f34e12fe0bd (commit)
- Log -----------------------------------------------------------------
commit dc7e42c6a12637bae1660561d3f4cef039001475
Author: x2018 <[email protected]>
Date: Tue Nov 23 19:25:43 2021 +0800
check the return value of OPENSSL_strdup to prevent potential memory access
error
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/17110)
-----------------------------------------------------------------------
Summary of changes:
apps/lib/engine_loader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/lib/engine_loader.c b/apps/lib/engine_loader.c
index 7ea05943f3..aa1bad26a4 100644
--- a/apps/lib/engine_loader.c
+++ b/apps/lib/engine_loader.c
@@ -89,7 +89,7 @@ static OSSL_STORE_LOADER_CTX *engine_open(const
OSSL_STORE_LOADER *loader,
keyid = OPENSSL_strdup(q + 1);
}
- if (e != NULL)
+ if (e != NULL && keyid != NULL)
ctx = OSSL_STORE_LOADER_CTX_new(e, keyid);
if (ctx == NULL) {