summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mul.c
diff options
context:
space:
mode:
authortb <>2023-03-27 10:22:47 +0000
committertb <>2023-03-27 10:22:47 +0000
commit31952254deba94cb76af7a03b169b818e5af326c (patch)
tree0185376a4aa675f04952445753ad498a9709a2e1 /src/lib/libcrypto/bn/bn_mul.c
parenta81a8ccd42d8aec45ab93fd62a292dc1d27c0db6 (diff)
downloadopenbsd-31952254deba94cb76af7a03b169b818e5af326c.tar.gz
openbsd-31952254deba94cb76af7a03b169b818e5af326c.tar.bz2
openbsd-31952254deba94cb76af7a03b169b818e5af326c.zip
Convert BN_copy() with missing error checks to bn_copy()
ok jsing
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mul.c')
-rw-r--r--src/lib/libcrypto/bn/bn_mul.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_mul.c b/src/lib/libcrypto/bn/bn_mul.c
index 5e270b988f..3a33767a93 100644
--- a/src/lib/libcrypto/bn/bn_mul.c
+++ b/src/lib/libcrypto/bn/bn_mul.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mul.c,v 1.34 2023/02/22 05:57:19 jsing Exp $ */ 1/* $OpenBSD: bn_mul.c,v 1.35 2023/03/27 10:22:47 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 *
@@ -786,8 +786,10 @@ BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
786 786
787 BN_set_negative(rr, a->neg ^ b->neg); 787 BN_set_negative(rr, a->neg ^ b->neg);
788 788
789 if (r != rr) 789 if (r != rr) {
790 BN_copy(r, rr); 790 if (!bn_copy(r, rr))
791 goto err;
792 }
791 done: 793 done:
792 ret = 1; 794 ret = 1;
793 err: 795 err: