提交 53b407da 编写于 作者: R Richard Levitte

Problem: bn_mul_normal() misbehaves if the size of b is 0.

Solution: multiply a with 0, putting the result in r, and return.
上级 765e5311
......@@ -1110,7 +1110,13 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb)
}
rr= &(r[na]);
rr[0]=bn_mul_words(r,a,na,b[0]);
if (nb <= 0)
{
(void)bn_mul_words(r,a,na,0);
return;
}
else
rr[0]=bn_mul_words(r,a,na,b[0]);
for (;;)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册