diff options
author | tb <> | 2023-03-27 10:21:23 +0000 |
---|---|---|
committer | tb <> | 2023-03-27 10:21:23 +0000 |
commit | da1a532fc7d061a1f8b375580c6d9d22ea78970b (patch) | |
tree | 78bb6d4286a0a95d7729bde003bd20eb6757d89a /src/lib/libcrypto/bn/bn_mont.c | |
parent | 62d326cb4e50a66b7d20ac55a0808f880deb43d9 (diff) | |
download | openbsd-da1a532fc7d061a1f8b375580c6d9d22ea78970b.tar.gz openbsd-da1a532fc7d061a1f8b375580c6d9d22ea78970b.tar.bz2 openbsd-da1a532fc7d061a1f8b375580c6d9d22ea78970b.zip |
Convert BN_copy() with explicit comparison against NULL to bn_copy()
ok jsing
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mont.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_mont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_mont.c b/src/lib/libcrypto/bn/bn_mont.c index 582c8d4ef8..b7b2384cff 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.53 2023/03/26 19:09:42 tb Exp $ */ | 1 | /* $OpenBSD: bn_mont.c,v 1.54 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 | * |
@@ -561,7 +561,7 @@ BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mctx, BN_CTX *ctx) | |||
561 | 561 | ||
562 | if ((tmp = BN_CTX_get(ctx)) == NULL) | 562 | if ((tmp = BN_CTX_get(ctx)) == NULL) |
563 | goto err; | 563 | goto err; |
564 | if (BN_copy(tmp, a) == NULL) | 564 | if (!bn_copy(tmp, a)) |
565 | goto err; | 565 | goto err; |
566 | if (!bn_montgomery_reduce(r, tmp, mctx)) | 566 | if (!bn_montgomery_reduce(r, tmp, mctx)) |
567 | goto err; | 567 | goto err; |