diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp2.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp2.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp2.c b/src/lib/libcrypto/bn/bn_exp2.c index c8f0294f7a..38bf467a38 100644 --- a/src/lib/libcrypto/bn/bn_exp2.c +++ b/src/lib/libcrypto/bn/bn_exp2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_exp2.c,v 1.9 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: bn_exp2.c,v 1.10 2015/02/09 15:49:22 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -150,11 +150,13 @@ BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1, | |||
150 | bits = (bits1 > bits2) ? bits1 : bits2; | 150 | bits = (bits1 > bits2) ? bits1 : bits2; |
151 | 151 | ||
152 | BN_CTX_start(ctx); | 152 | BN_CTX_start(ctx); |
153 | d = BN_CTX_get(ctx); | 153 | if ((d = BN_CTX_get(ctx)) == NULL) |
154 | r = BN_CTX_get(ctx); | 154 | goto err; |
155 | val1[0] = BN_CTX_get(ctx); | 155 | if ((r = BN_CTX_get(ctx)) == NULL) |
156 | val2[0] = BN_CTX_get(ctx); | 156 | goto err; |
157 | if (!d || !r || !val1[0] || !val2[0]) | 157 | if ((val1[0] = BN_CTX_get(ctx)) == NULL) |
158 | goto err; | ||
159 | if ((val2[0] = BN_CTX_get(ctx)) == NULL) | ||
158 | goto err; | 160 | goto err; |
159 | 161 | ||
160 | if (in_mont != NULL) | 162 | if (in_mont != NULL) |