summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2010-02-28 18:49:43 +0000
committersimon <simon@FreeBSD.org>2010-02-28 18:49:43 +0000
commitcdb6eef1f013e22a10ab5f5829dcdc3b5e32d385 (patch)
tree21770f10e7f26d05fc9b0fa96a7b6d7b107552c5 /crypto/bn/bn_exp.c
parent3bc8c7595d6f805f614ed860868465e3c1d3ee2b (diff)
downloadFreeBSD-src-cdb6eef1f013e22a10ab5f5829dcdc3b5e32d385.zip
FreeBSD-src-cdb6eef1f013e22a10ab5f5829dcdc3b5e32d385.tar.gz
Import OpenSSL 0.9.8m.
Diffstat (limited to 'crypto/bn/bn_exp.c')
-rw-r--r--crypto/bn/bn_exp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/bn/bn_exp.c b/crypto/bn/bn_exp.c
index 70a33f0..d9b6c73 100644
--- a/crypto/bn/bn_exp.c
+++ b/crypto/bn/bn_exp.c
@@ -134,7 +134,8 @@ int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
rr = BN_CTX_get(ctx);
else
rr = r;
- if ((v = BN_CTX_get(ctx)) == NULL) goto err;
+ v = BN_CTX_get(ctx);
+ if (rr == NULL || v == NULL) goto err;
if (BN_copy(v,a) == NULL) goto err;
bits=BN_num_bits(p);
OpenPOWER on IntegriCloud