diff options
author | PW Hu <jlu.hpw@foxmail.com> | 2021-10-08 16:59:00 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-10-11 10:46:03 +0200 |
commit | 6e463bcd53fedbb4ec277a5eb885619e32adcdd2 (patch) | |
tree | 5d71a27a7dcf07664290debdb0e88acba0c23740 /test/helpers | |
parent | ce5b392c8dc99f849dabea8bc9a21f66908b4188 (diff) |
Bugfix: unsafe return check of EVP_PKEY_fromdata_init
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16783)
(cherry picked from commit 5e199c356d09aca3b625b5ea16966b36d24b0201)
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/predefined_dhparams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/helpers/predefined_dhparams.c b/test/helpers/predefined_dhparams.c index a6dd8c08a5..b2f6601188 100644 --- a/test/helpers/predefined_dhparams.c +++ b/test/helpers/predefined_dhparams.c @@ -23,7 +23,7 @@ static EVP_PKEY *get_dh_from_pg_bn(OSSL_LIB_CTX *libctx, const char *type, OSSL_PARAM *params = NULL; EVP_PKEY *dhpkey = NULL; - if (pctx == NULL || !EVP_PKEY_fromdata_init(pctx)) + if (pctx == NULL || EVP_PKEY_fromdata_init(pctx) <= 0) goto err; if ((tmpl = OSSL_PARAM_BLD_new()) == NULL |