diff options
author | PW Hu <jlu.hpw@foxmail.com> | 2021-11-01 15:00:54 +0800 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-11-08 08:53:02 +1000 |
commit | 098f2627c8d283a518a6e6e60e7893664c7510e0 (patch) | |
tree | aad5a6104e3c5672f98ccbee14dbc32334547c40 /test/ecdsatest.c | |
parent | ab547fc005307ecf48451638e947cdabca147159 (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)
Diffstat (limited to 'test/ecdsatest.c')
-rw-r--r-- | test/ecdsatest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ecdsatest.c b/test/ecdsatest.c index c94d7d8dab..282b9660d3 100644 --- a/test/ecdsatest.c +++ b/test/ecdsatest.c @@ -46,7 +46,7 @@ static int fbytes(unsigned char *buf, size_t num, ossl_unused const char *name, || !TEST_true(BN_hex2bn(&tmp, numbers[fbytes_counter])) /* tmp might need leading zeros so pad it out */ || !TEST_int_le(BN_num_bytes(tmp), num) - || !TEST_true(BN_bn2binpad(tmp, buf, num))) + || !TEST_int_gt(BN_bn2binpad(tmp, buf, num), 0)) goto err; fbytes_counter = (fbytes_counter + 1) % OSSL_NELEM(numbers); |