diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 9e4497bb06..4944daa48c 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_exp.c,v 1.41 2023/03/26 19:09:42 tb Exp $ */ | 1 | /* $OpenBSD: bn_exp.c,v 1.42 2023/03/27 10:21:23 tb 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 | * |
| @@ -142,12 +142,12 @@ BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) | |||
| 142 | if (rr == NULL || v == NULL) | 142 | if (rr == NULL || v == NULL) |
| 143 | goto err; | 143 | goto err; |
| 144 | 144 | ||
| 145 | if (BN_copy(v, a) == NULL) | 145 | if (!bn_copy(v, a)) |
| 146 | goto err; | 146 | goto err; |
| 147 | bits = BN_num_bits(p); | 147 | bits = BN_num_bits(p); |
| 148 | 148 | ||
| 149 | if (BN_is_odd(p)) { | 149 | if (BN_is_odd(p)) { |
| 150 | if (BN_copy(rr, a) == NULL) | 150 | if (!bn_copy(rr, a)) |
| 151 | goto err; | 151 | goto err; |
| 152 | } else { | 152 | } else { |
| 153 | if (!BN_one(rr)) | 153 | if (!BN_one(rr)) |
