diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bn/bn_word.c | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bn/bn_word.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bn/bn_word.c b/src/lib/libcrypto/bn/bn_word.c index ab858d70ff..de610ce54c 100644 --- a/src/lib/libcrypto/bn/bn_word.c +++ b/src/lib/libcrypto/bn/bn_word.c | |||
@@ -146,6 +146,9 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) | |||
146 | { | 146 | { |
147 | int i; | 147 | int i; |
148 | 148 | ||
149 | if ((w & BN_MASK2) == 0) | ||
150 | return(1); | ||
151 | |||
149 | if (BN_is_zero(a) || a->neg) | 152 | if (BN_is_zero(a) || a->neg) |
150 | { | 153 | { |
151 | a->neg=0; | 154 | a->neg=0; |
diff --git a/src/lib/libssl/src/crypto/bn/bn_word.c b/src/lib/libssl/src/crypto/bn/bn_word.c index ab858d70ff..de610ce54c 100644 --- a/src/lib/libssl/src/crypto/bn/bn_word.c +++ b/src/lib/libssl/src/crypto/bn/bn_word.c | |||
@@ -146,6 +146,9 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) | |||
146 | { | 146 | { |
147 | int i; | 147 | int i; |
148 | 148 | ||
149 | if ((w & BN_MASK2) == 0) | ||
150 | return(1); | ||
151 | |||
149 | if (BN_is_zero(a) || a->neg) | 152 | if (BN_is_zero(a) || a->neg) |
150 | { | 153 | { |
151 | a->neg=0; | 154 | a->neg=0; |