提交 8b4e27e2 编写于 作者: R Richard Levitte

In the case where a < 0 and |a| < w, the result (assigned to a) from

BN_add_word becomes wrongly negative...
This was discovered by Darrel Hankerson <dhankers@cacr.math.uwaterloo.ca>
上级 d6ade742
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册