summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorPW Hu <jlu.hpw@foxmail.com>2021-11-01 15:00:54 +0800
committerPauli <pauli@openssl.org>2021-11-08 08:54:18 +1000
commitd8e830954fdb19ac4cec07c7e902562e290fbe05 (patch)
tree54ca59368edad79f13a15910cbb05da0933bf384 /crypto/ec
parent0cb66d6bfeb7685f5776e1a93d716024fe678018 (diff)
Fix incorrect return check of BN_bn2binpad
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16942) (cherry picked from commit 098f2627c8d283a518a6e6e60e7893664c7510e0)
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_deprecated.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/ec_deprecated.c b/crypto/ec/ec_deprecated.c
index cd2eec80b7..22ddb3660c 100644
--- a/crypto/ec/ec_deprecated.c
+++ b/crypto/ec/ec_deprecated.c
@@ -52,7 +52,7 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group,
return NULL;
}
- if (!BN_bn2binpad(bn, buf, buf_len)) {
+ if (BN_bn2binpad(bn, buf, buf_len) < 0) {
OPENSSL_free(buf);
return NULL;
}