diff options
author | Richard Levitte <levitte@openssl.org> | 2000-07-27 21:32:23 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2000-07-27 21:32:23 +0000 |
commit | 8083e1bd9e2bc7d32cee960c09dcb838c12a0495 (patch) | |
tree | 146cf8d87d3b488c8c19a44588fa8d6d445cff94 /crypto/bn/bn_word.c | |
parent | 8b4e27e26efc097dbe65b0c3cd78a2da7be310ef (diff) | |
download | openssl-8083e1bd9e2bc7d32cee960c09dcb838c12a0495.zip openssl-8083e1bd9e2bc7d32cee960c09dcb838c12a0495.tar.gz openssl-8083e1bd9e2bc7d32cee960c09dcb838c12a0495.tar.bz2 |
There's a slight possibility that a is 0 in BN_sub_word(), and might
therefore have unallocated parts. Therefore, a check for the 0 case
is needed, resulting with the same thing as when a is negative.
Diffstat (limited to 'crypto/bn/bn_word.c')
-rw-r--r-- | crypto/bn/bn_word.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_word.c b/crypto/bn/bn_word.c index 7e7ca58..f3bdde9 100644 --- a/crypto/bn/bn_word.c +++ b/crypto/bn/bn_word.c @@ -140,7 +140,7 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w) { int i; - if (a->neg) + if (BN_is_zero(a) || a->neg) { a->neg=0; i=BN_add_word(a,w); |