summaryrefslogtreecommitdiffstats
path: root/test/acvp_test.c
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 /test/acvp_test.c
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 'test/acvp_test.c')
-rw-r--r--test/acvp_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 6512a6ec35..4b6632e689 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -71,7 +71,7 @@ static int pkey_get_bn_bytes(EVP_PKEY *pkey, const char *name,
buf = OPENSSL_zalloc(sz);
if (buf == NULL)
goto err;
- if (!BN_bn2binpad(bn, buf, sz))
+ if (BN_bn2binpad(bn, buf, sz) <= 0)
goto err;
*out_len = sz;