X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fbn%2Fbn_mod.c;h=5cf82480d7bafb8e61b52ef62f44118e1acf9d30;hb=f8000b93459cff7468c0a86dec913d06c0f0b6d6;hp=92fe11684c8c914a7a006fc72f5693841c8fcb87;hpb=5acaa49504153ecdd9734ac80aeb9153fde94e48;p=oweals%2Fopenssl.git diff --git a/crypto/bn/bn_mod.c b/crypto/bn/bn_mod.c index 92fe11684c..5cf82480d7 100644 --- a/crypto/bn/bn_mod.c +++ b/crypto/bn/bn_mod.c @@ -150,8 +150,8 @@ int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_ 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_cmp(r, m) >= 0) - return BN_sub(r, r, m); + if (BN_ucmp(r, m) >= 0) + return BN_usub(r, r, m); return 1; }