提交 5e386163 编写于 作者: B Bodo Möller

Fix for BN_mul_word(a, 0).

上级 54705b39
......@@ -182,11 +182,16 @@ int BN_mul_word(BIGNUM *a, BN_ULONG w)
w&=BN_MASK2;
if (a->top)
{
ll=bn_mul_words(a->d,a->d,a->top,w);
if (ll)
if (w == 0)
BN_zero(a);
else
{
if (bn_wexpand(a,a->top+1) == NULL) return(0);
a->d[a->top++]=ll;
ll=bn_mul_words(a->d,a->d,a->top,w);
if (ll)
{
if (bn_wexpand(a,a->top+1) == NULL) return(0);
a->d[a->top++]=ll;
}
}
}
return(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册