diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mont.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_mont.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/bn/bn_mont.c b/src/lib/libcrypto/bn/bn_mont.c index 5803ca493d..3eb9913a9e 100644 --- a/src/lib/libcrypto/bn/bn_mont.c +++ b/src/lib/libcrypto/bn/bn_mont.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_mont.c,v 1.23 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: bn_mont.c,v 1.24 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 | * |
@@ -149,8 +149,7 @@ BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, | |||
149 | #endif | 149 | #endif |
150 | 150 | ||
151 | BN_CTX_start(ctx); | 151 | BN_CTX_start(ctx); |
152 | tmp = BN_CTX_get(ctx); | 152 | if ((tmp = BN_CTX_get(ctx)) == NULL) |
153 | if (tmp == NULL) | ||
154 | goto err; | 153 | goto err; |
155 | 154 | ||
156 | bn_check_top(tmp); | 155 | bn_check_top(tmp); |
@@ -288,9 +287,9 @@ BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx) | |||
288 | BIGNUM *t1, *t2; | 287 | BIGNUM *t1, *t2; |
289 | 288 | ||
290 | BN_CTX_start(ctx); | 289 | BN_CTX_start(ctx); |
291 | t1 = BN_CTX_get(ctx); | 290 | if ((t1 = BN_CTX_get(ctx)) == NULL) |
292 | t2 = BN_CTX_get(ctx); | 291 | goto err; |
293 | if (t1 == NULL || t2 == NULL) | 292 | if ((t2 = BN_CTX_get(ctx)) == NULL) |
294 | goto err; | 293 | goto err; |
295 | 294 | ||
296 | if (!BN_copy(t1, a)) | 295 | if (!BN_copy(t1, a)) |