PR: 2540
Submitted by: emmanuel.azencot@bull.net Reviewed by: steve Prevent infinite loop in BN_GF2m_mod_inv().
This commit is contained in:
parent
33c98a28ac
commit
dcbe723bc5
1 changed files with 1 additions and 0 deletions
|
@ -547,6 +547,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))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue