bntest: don't dereference the |d| array for a zero BIGNUM.
Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit 4d04226c2ec7e7f69f6234def63631648e35e828) (cherry picked from commit 9c989aaa749d88b63bef5d5beeb3046eae62d836)
This commit is contained in:
parent
9a97446468
commit
cb5320014d
@ -516,9 +516,9 @@ int test_div_word(BIO *bp)
|
||||
do {
|
||||
BN_bntest_rand(&a, 512, -1, 0);
|
||||
BN_bntest_rand(&b, BN_BITS2, -1, 0);
|
||||
s = b.d[0];
|
||||
} while (!s);
|
||||
} while (BN_is_zero(&b));
|
||||
|
||||
s = b.d[0];
|
||||
BN_copy(&b, &a);
|
||||
r = BN_div_word(&b, s);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user