Commit 8038e7e4 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

PR: 2540

Submitted by: emmanuel.azencot@bull.net
Reviewed by: steve

Prevent infinite loop in BN_GF2m_mod_inv().
parent b507284c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -548,6 +548,7 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
		{
		while (!BN_is_odd(u))
			{
			if (BN_is_zero(u)) goto err;
			if (!BN_rshift1(u, u)) goto err;
			if (BN_is_odd(b))
				{