projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f21fb85
)
bntest: don't dereference the |d| array for a zero BIGNUM.
author
Emilia Kasper
<emilia@openssl.org>
Mon, 31 Aug 2015 11:57:44 +0000
(13:57 +0200)
committer
Emilia Kasper
<emilia@openssl.org>
Mon, 31 Aug 2015 14:53:04 +0000
(16:53 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit
4d04226c2ec7e7f69f6234def63631648e35e828
)
crypto/bn/bntest.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bntest.c
b/crypto/bn/bntest.c
index 470d5dabf1ec9bf510a1b8fabb758af06d77b7e8..0f8e18f39600b4f15eb2fdd5e9149529de63c518 100644
(file)
--- a/
crypto/bn/bntest.c
+++ b/
crypto/bn/bntest.c
@@
-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);