Commit 9c989aaa authored by Emilia Kasper's avatar Emilia Kasper
Browse files

bntest: don't dereference the |d| array for a zero BIGNUM.



Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(cherry picked from commit 4d04226c)
parent f21fb858
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);