[openssl] master update
patrick.steuer at de.ibm.com
patrick.steuer at de.ibm.com
Fri Nov 1 15:19:33 UTC 2019
The branch master has been updated
via fefe3169bb12865732a3395ce43995fc661ff10b (commit)
from 351ba5bd27645d5b5a2bc643b2709bd30bcdf09c (commit)
- Log -----------------------------------------------------------------
commit fefe3169bb12865732a3395ce43995fc661ff10b
Author: jayaram <jayaramx.matta at intel.com>
Date: Wed Oct 30 12:56:18 2019 +0530
fix for Missing null check after OPENSSL_zalloc
Fixes #10283
Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Patrick Steuer <patrick.steuer at de.ibm.com>
(Merged from https://github.com/openssl/openssl/pull/10296)
-----------------------------------------------------------------------
Summary of changes:
crypto/evp/keymgmt_lib.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crypto/evp/keymgmt_lib.c b/crypto/evp/keymgmt_lib.c
index a14decd280..5e9ec73f7d 100644
--- a/crypto/evp/keymgmt_lib.c
+++ b/crypto/evp/keymgmt_lib.c
@@ -18,12 +18,14 @@ static OSSL_PARAM *paramdefs_to_params(const OSSL_PARAM *paramdefs)
{
size_t cnt;
const OSSL_PARAM *p;
- OSSL_PARAM *params, *q;
+ OSSL_PARAM *params = NULL, *q;
for (cnt = 1, p = paramdefs; p->key != NULL; p++, cnt++)
continue;
params = OPENSSL_zalloc(cnt * sizeof(*params));
+ if (params == NULL)
+ return NULL;
for (p = paramdefs, q = params; ; p++, q++) {
*q = *p;
@@ -78,6 +80,8 @@ static void *allocate_params_space(OSSL_PARAM *params)
return NULL;
data = OPENSSL_zalloc(space);
+ if (data == NULL)
+ return NULL;
for (space = 0, p = params; p->key != NULL; p++) {
p->data = data + space;
More information about the openssl-commits
mailing list