Make sure BN_sqr can never return a negative value.
PR#3410 (cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb)
This commit is contained in:
parent
da0d5e78bc
commit
fef58ce79e
@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
|
|||||||
if (al <= 0)
|
if (al <= 0)
|
||||||
{
|
{
|
||||||
r->top=0;
|
r->top=0;
|
||||||
|
r->neg = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user