[openssl] master update
tomas at openssl.org
tomas at openssl.org
Wed Jan 5 09:17:49 UTC 2022
The branch master has been updated
via 0da3b39af3d961486758262ca71d2135d7013048 (commit)
from 8582dccc4dd1f1667b0e91a098e2cc78c7146dd7 (commit)
- Log -----------------------------------------------------------------
commit 0da3b39af3d961486758262ca71d2135d7013048
Author: x2018 <xkernel.wang at foxmail.com>
Date: Mon Nov 29 19:08:36 2021 +0800
check the return value of OSSL_PARAM_BLD_new in dsa_kmgmt.c:195
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17155)
-----------------------------------------------------------------------
Summary of changes:
providers/implementations/keymgmt/dsa_kmgmt.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c
index 1e1b168f7d..b327a3a783 100644
--- a/providers/implementations/keymgmt/dsa_kmgmt.c
+++ b/providers/implementations/keymgmt/dsa_kmgmt.c
@@ -210,12 +210,16 @@ static int dsa_export(void *keydata, int selection, OSSL_CALLBACK *param_cb,
void *cbarg)
{
DSA *dsa = keydata;
- OSSL_PARAM_BLD *tmpl = OSSL_PARAM_BLD_new();
+ OSSL_PARAM_BLD *tmpl;
OSSL_PARAM *params = NULL;
int ok = 1;
if (!ossl_prov_is_running() || dsa == NULL)
- goto err;
+ return 0;
+
+ tmpl = OSSL_PARAM_BLD_new();
+ if (tmpl == NULL)
+ return 0;
if ((selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS) != 0)
ok = ok && ossl_ffc_params_todata(ossl_dsa_get0_params(dsa), tmpl, NULL);
More information about the openssl-commits
mailing list