summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mod.c')
-rw-r--r--src/lib/libcrypto/bn/bn_mod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_mod.c b/src/lib/libcrypto/bn/bn_mod.c
index 2072dd904f..868ef5bc5b 100644
--- a/src/lib/libcrypto/bn/bn_mod.c
+++ b/src/lib/libcrypto/bn/bn_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mod.c,v 1.19 2023/02/03 05:15:40 jsing Exp $ */ 1/* $OpenBSD: bn_mod.c,v 1.20 2023/03/27 10:21:23 tb Exp $ */
2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> 2/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de>
3 * for the OpenSSL project. */ 3 * for the OpenSSL project. */
4/* ==================================================================== 4/* ====================================================================
@@ -264,7 +264,7 @@ BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx)
264 if (BN_is_negative(m)) { 264 if (BN_is_negative(m)) {
265 if ((abs_m = BN_CTX_get(ctx)) == NULL) 265 if ((abs_m = BN_CTX_get(ctx)) == NULL)
266 goto err; 266 goto err;
267 if (BN_copy(abs_m, m) == NULL) 267 if (!bn_copy(abs_m, m))
268 goto err; 268 goto err;
269 BN_set_negative(abs_m, 0); 269 BN_set_negative(abs_m, 0);
270 m = abs_m; 270 m = abs_m;
@@ -288,7 +288,7 @@ BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m)
288{ 288{
289 int max_shift; 289 int max_shift;
290 290
291 if (BN_copy(r, a) == NULL) 291 if (!bn_copy(r, a))
292 return 0; 292 return 0;
293 293
294 while (n > 0) { 294 while (n > 0) {