diff options
| author | tb <> | 2023-03-27 10:21:23 +0000 |
|---|---|---|
| committer | tb <> | 2023-03-27 10:21:23 +0000 |
| commit | a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6 (patch) | |
| tree | 78bb6d4286a0a95d7729bde003bd20eb6757d89a /src/lib/libcrypto/bn/bn_exp.c | |
| parent | 33735e4122c0261b555f35ac60c32d7fca12f86c (diff) | |
| download | openbsd-a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6.tar.gz openbsd-a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6.tar.bz2 openbsd-a81a8ccd42d8aec45ab93fd62a292dc1d27c0db6.zip | |
Convert BN_copy() with explicit comparison against NULL to bn_copy()
ok jsing
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)) |
