diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_recp.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_recp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_recp.c b/src/lib/libcrypto/bn/bn_recp.c index 7b31fe0adf..b0bd0aa4df 100644 --- a/src/lib/libcrypto/bn/bn_recp.c +++ b/src/lib/libcrypto/bn/bn_recp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_recp.c,v 1.12 2015/03/21 08:05:20 doug Exp $ */ | 1 | /* $OpenBSD: bn_recp.c,v 1.13 2015/04/29 00:11:12 doug 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 | * |
| @@ -161,8 +161,10 @@ BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, | |||
| 161 | 161 | ||
| 162 | if (BN_ucmp(m, &(recp->N)) < 0) { | 162 | if (BN_ucmp(m, &(recp->N)) < 0) { |
| 163 | BN_zero(d); | 163 | BN_zero(d); |
| 164 | if (!BN_copy(r, m)) | 164 | if (!BN_copy(r, m)) { |
| 165 | BN_CTX_end(ctx); | ||
| 165 | return 0; | 166 | return 0; |
| 167 | } | ||
| 166 | BN_CTX_end(ctx); | 168 | BN_CTX_end(ctx); |
| 167 | return (1); | 169 | return (1); |
| 168 | } | 170 | } |
