提交 69b5d3c5 编写于 作者: B Ben Laurie

Don't let top go below zero!

上级 2bfb4dbc
......@@ -90,7 +90,7 @@ int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
bn_wexpand(tmp2,a->top*4);
bn_sqr_recursive(tmp->d,a->d,a->top,tmp2->d);
tmp->top=a->top*2;
if (tmp->d[tmp->top-1] == 0)
if (tmp->top > 0 && tmp->d[tmp->top-1] == 0)
tmp->top--;
#else
if (!BN_sqr(tmp,a,ctx)) goto err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册