提交 9f6795e7 编写于 作者: P Pascal Cuoq 提交者: Kurt Roeckx

BN_usub: Don't copy when r and a the same

Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NRich Salz <rsalz@akamai.com>

RT #4100, MR #1264
上级 1786086b
......@@ -222,7 +222,7 @@ int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
break;
}
}
if (dif)
if (dif && ap != rp)
memcpy(rp, ap, sizeof(*rp) * dif);
r->top = max;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册