projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
There's a slight possibility that a is 0 in BN_sub_word(), and might
[openssl.git]
/
crypto
/
bn
/
bn_word.c
diff --git
a/crypto/bn/bn_word.c
b/crypto/bn/bn_word.c
index 73157a7d43fda6711572abe34dd28a11b0855a42..f3bdde969cc376a9344b9d58c6d8c6a97766bcd6 100644
(file)
--- a/
crypto/bn/bn_word.c
+++ b/
crypto/bn/bn_word.c
@@
-115,7
+115,7
@@
int BN_add_word(BIGNUM *a, BN_ULONG w)
a->neg=0;
i=BN_sub_word(a,w);
if (!BN_is_zero(a))
- a->neg=
1
;
+ a->neg=
!(a->neg)
;
return(i);
}
w&=BN_MASK2;
@@
-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);