summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_div.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-06-17 11:26:09 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-06-17 11:26:09 +0000
commit8280b43a62b3498709b9e9eaec158832210fbd6a (patch)
treebb0b716a08274301e187e232b2cf390185cdac9d /crypto/bn/bn_div.c
parent85d9b02d160982824fc241e6ba1de02a318baf5f (diff)
Update from HEAD.
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r--crypto/bn/bn_div.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c
index 6db472f8c3..899d07ca24 100644
--- a/crypto/bn/bn_div.c
+++ b/crypto/bn/bn_div.c
@@ -229,7 +229,8 @@ int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
if (dv == NULL)
res=BN_CTX_get(ctx);
else res=dv;
- if (sdiv == NULL || res == NULL) goto err;
+ if (sdiv == NULL || res == NULL || tmp == NULL || snum == NULL)
+ goto err;
/* First we normalise the numbers */
norm_shift=BN_BITS2-((BN_num_bits(divisor))%BN_BITS2);