提交 1544583b 编写于 作者: K Kurt Roeckx

Avoid creating an illegal pointer

Found by tis-interpreter
Reviewed-by: NRich Salz <rsalz@openssl.org>

GH: #1106
上级 acc60092
...@@ -1022,9 +1022,11 @@ void bn_correct_top(BIGNUM *a) ...@@ -1022,9 +1022,11 @@ void bn_correct_top(BIGNUM *a)
int tmp_top = a->top; int tmp_top = a->top;
if (tmp_top > 0) { if (tmp_top > 0) {
for (ftl = &(a->d[tmp_top - 1]); tmp_top > 0; tmp_top--) for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
if (*(ftl--)) ftl--;
if (*ftl != 0)
break; break;
}
a->top = tmp_top; a->top = tmp_top;
} }
bn_pollute(a); bn_pollute(a);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册