diff options
Diffstat (limited to 'lib/libcrypto/bn')
-rw-r--r-- | lib/libcrypto/bn/bn_word.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libcrypto/bn/bn_word.c b/lib/libcrypto/bn/bn_word.c index ab858d70ff6..de610ce54c2 100644 --- a/lib/libcrypto/bn/bn_word.c +++ b/lib/libcrypto/bn/bn_word.c @@ -146,6 +146,9 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) { int i; + if ((w & BN_MASK2) == 0) + return(1); + if (BN_is_zero(a) || a->neg) { a->neg=0; |