Project

General

Profile

strongswan-4.4.0-5.5.2_gmp_mpz_powm_sec.patch

Fabrice Barconnière, 05/17/2017 11:06 AM

Download (1.31 KB)

View differences:

src/libstrongswan/plugins/gmp/gmp_rsa_public_key.c
475 475
		}
476 476
		break;
477 477
	}
478
	if (!e.ptr || !n.ptr)
478
	if (!e.len || !n.len || (n.ptr[n.len-1] & 0x01) == 0)
479 479
	{
480 480
		return NULL;
481 481
	}
......
506 506

  
507 507
	this->k = (mpz_sizeinbase(this->n, 2) + 7) / BITS_PER_BYTE;
508 508

  
509
	if (!mpz_sgn(this->e))
510
	{
511
		destroy(this);
512
		return NULL;
513
	}
509 514
	return &this->public;
510 515
}
511
-