diff options
author | PW Hu <jlu.hpw@foxmail.com> | 2021-11-01 15:08:51 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-11-02 12:01:34 +0100 |
commit | 1585f190290187c2601489f11b6907a8fa2e1109 (patch) | |
tree | 9781d807a23a0678ba3402951aa7a3bd32f00e77 /crypto/evp | |
parent | 0b5a0043f9c09a7afff7ae18559ee984226ea25b (diff) |
Fix incorrect return check of BN_bn2nativepad
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16943)
(cherry picked from commit 944fcfc69d16dfd20decdd9cd105436f0043dbe0)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/ctrl_params_translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c index b17ce3cbf9..d17017a78e 100644 --- a/crypto/evp/ctrl_params_translate.c +++ b/crypto/evp/ctrl_params_translate.c @@ -465,8 +465,8 @@ static int default_fixup_args(enum state state, ERR_raise(ERR_LIB_EVP, ERR_R_MALLOC_FAILURE); return 0; } - if (!BN_bn2nativepad(ctx->p2, - ctx->allocated_buf, ctx->buflen)) { + if (BN_bn2nativepad(ctx->p2, + ctx->allocated_buf, ctx->buflen) < 0) { OPENSSL_free(ctx->allocated_buf); ctx->allocated_buf = NULL; return 0; |