mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
check the return value of OSSL_PARAM_BLD_new in dsa_kmgmt.c:195
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17155)
This commit is contained in:
parent
8582dccc4d
commit
0da3b39af3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user