mirror of
https://github.com/openssl/openssl.git
synced 2025-01-06 17:24:03 +08:00
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.
This commit is contained in:
parent
8b4e27e26e
commit
8083e1bd9e
@ -140,7 +140,7 @@ int BN_sub_word(BIGNUM *a, BN_ULONG w)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (a->neg)
|
if (BN_is_zero(a) || a->neg)
|
||||||
{
|
{
|
||||||
a->neg=0;
|
a->neg=0;
|
||||||
i=BN_add_word(a,w);
|
i=BN_add_word(a,w);
|
||||||
|
Loading…
Reference in New Issue
Block a user