From 1b06804491c8cd5a7bb1e4911578351bbe91a2af Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Sun, 22 Feb 2004 19:30:41 +0000 Subject: [PATCH] When adding positive elements, we can use BN_uadd() instead of BN_add(). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe --- crypto/bn/bn_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c index 61b7255098..77d6ddb91a 100644 --- a/crypto/bn/bn_mod.c +++ b/crypto/bn/bn_mod.c @@ -149,7 +149,7 @@ int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_ * and less than m */ int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m) { - if (!BN_add(r, a, b)) return 0; + if (!BN_uadd(r, a, b)) return 0; if (BN_ucmp(r, m) >= 0) return BN_usub(r, r, m); return 1; -- 2.25.1