提交 e15ea3d9 编写于 作者: R Richard Levitte

When BN_add_word() reaches top, it shouldn't try to add the the corresponding

word, since that word may not be zero.
上级 67753262
...@@ -123,7 +123,10 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) ...@@ -123,7 +123,10 @@ int BN_add_word(BIGNUM *a, BN_ULONG w)
i=0; i=0;
for (;;) for (;;)
{ {
l=(a->d[i]+(BN_ULONG)w)&BN_MASK2; if (i >= a->top)
l=w;
else
l=(a->d[i]+(BN_ULONG)w)&BN_MASK2;
a->d[i]=l; a->d[i]=l;
if (w > l) if (w > l)
w=1; w=1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册