Index: b/cipher/elgamal.c =================================================================== --- b/cipher/elgamal.c +++ b/cipher/elgamal.c @@ -384,6 +384,7 @@ qbits++; g = mpi_alloc (1); p = _gcry_generate_elg_prime ( 0, nbits, qbits, g, ret_factors ); + gcry_assert (p); mpi_sub_ui (p_min1, p, 1); if (DBG_CIPHER)