diff options
author | ndossche <niels.dossche@ugent.be> | 2023-01-30 15:24:01 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-02-08 16:56:20 +0100 |
commit | 650f0474282330e3eb2a3df0eff5864bbdcf5845 (patch) | |
tree | 01fefc84ee9ab68dc0521ee484dda94243c5a390 /crypto | |
parent | 513e103f14e8473fb6810aa216ab3fb7b724ca5d (diff) |
Fix error check on default_check() helper function
default_check() can return a zero value to indicate an internal error in
one condition for the PRE_CTRL_STR_TO_PARAMS state. This state can be
reached from the default_fixup_args() function which does not check for
a zero value. All other callers of default_check() in that file do check
for a zero return value. Fix it by changing the check to <= 0.
CLA: trivial
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20175)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/ctrl_params_translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c index f64c1fcb2a..a3db7aed34 100644 --- a/crypto/evp/ctrl_params_translate.c +++ b/crypto/evp/ctrl_params_translate.c @@ -387,7 +387,7 @@ static int default_fixup_args(enum state state, { int ret; - if ((ret = default_check(state, translation, ctx)) < 0) + if ((ret = default_check(state, translation, ctx)) <= 0) return ret; switch (state) { |