X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbn%2Fbn_div.c;h=0fef7ced207fb80b60a2bf7c051c36e32fe4c46b;hp=ff218957b1d2290ec7839b798342f6c1a8dc0b3e;hb=5c0c22803e7bf96f96507d875f782eb283b718e7;hpb=d870740cd75dd4f0cb66fb8c32653a7d47369706 diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index ff218957b1..0fef7ced20 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -185,6 +185,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, BN_ULONG d0,d1; int num_n,div_n; + bn_check_top(dv); + bn_check_top(rm); bn_check_top(num); bn_check_top(divisor); @@ -233,7 +235,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor, wnum.dmax= snum->dmax - loop; /* so we don't step out of bounds */ /* Get the top 2 words of sdiv */ - /* i=sdiv->top; */ + /* div_n=sdiv->top; */ d0=sdiv->d[div_n-1]; d1=(div_n == 1)?0:sdiv->d[div_n-2];