summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_div.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-11-06 23:11:07 +0000
committerGeoff Thorpe <geoff@openssl.org>2003-11-06 23:11:07 +0000
commit5c0c22803e7bf96f96507d875f782eb283b718e7 (patch)
tree14bbae0f5163defa9c267ad95917b64c009dd596 /crypto/bn/bn_div.c
parent0ef85c7f4512570a02c4ff5d95a275ecf225702a (diff)
Put more debug screening in BN_div() and correct a comment.
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r--crypto/bn/bn_div.c4
1 files changed, 3 insertions, 1 deletions
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];