From: Geoff Thorpe Date: Sun, 22 Feb 2004 19:30:41 +0000 (+0000) Subject: When adding positive elements, we can use BN_uadd() instead of BN_add(). X-Git-Tag: LEVITTE_before_const~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1b06804491c8cd5a7bb1e4911578351bbe91a2af;p=oweals%2Fopenssl.git When adding positive elements, we can use BN_uadd() instead of BN_add(). Submitted by: Nils Larsch Reviewed by: Geoff Thorpe --- 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;