Commit 3b3b69ab authored by Huzaifa Sidhpurwala's avatar Huzaifa Sidhpurwala Committed by Dr. Stephen Henson
Browse files

Make sure BN_sqr can never return a negative value.

PR#3410
parent 7be6b27a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
	if (al <= 0)
		{
		r->top=0;
		r->neg = 0;
		return 1;
		}