diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2022-01-05 23:17:53 +0800 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2022-01-07 21:11:37 +1100 |
commit | 10481d33844218694929a7bad57314411a33ab74 (patch) | |
tree | 19d04c743b55b29b73a97a91cfafde4a2e94f4d8 /crypto/ec/ec_lib.c | |
parent | 22778abad905536fa6c93cdc6fffc8c736dfee79 (diff) |
Fix: some patches related to error exiting
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17417)
Diffstat (limited to 'crypto/ec/ec_lib.c')
-rw-r--r-- | crypto/ec/ec_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 3d3cf96962..2d85d4f23a 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -1710,8 +1710,8 @@ EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[], ptmp = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_EC_ENCODING); if (ptmp != NULL && !ossl_ec_encoding_param2id(ptmp, &encoding_flag)) { - ECerr(0, EC_R_INVALID_ENCODING); - return 0; + ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING); + goto err; } if (encoding_flag == OPENSSL_EC_NAMED_CURVE) { ERR_raise(ERR_LIB_EC, EC_R_INVALID_ENCODING); |