mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* primegen.c (gen_prime): Bail out if NBITS is zero. This is
Debian bug #213989 reported by Max <rusmir@tula.net>.
This commit is contained in:
parent
25bf32a078
commit
b7bd594c8c
@ -1,3 +1,8 @@
|
|||||||
|
2003-10-06 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* primegen.c (gen_prime): Bail out if NBITS is zero. This is
|
||||||
|
Debian bug #213989 reported by Max <rusmir@tula.net>.
|
||||||
|
|
||||||
2003-09-04 David Shaw <dshaw@jabberwocky.com>
|
2003-09-04 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* md.c (string_to_digest_algo): Enable read-write SHA-256 support.
|
* md.c (string_to_digest_algo): Enable read-write SHA-256 support.
|
||||||
|
@ -292,7 +292,7 @@ generate_elg_prime( int mode, unsigned pbits, unsigned qbits,
|
|||||||
|
|
||||||
|
|
||||||
static MPI
|
static MPI
|
||||||
gen_prime( unsigned nbits, int secret, int randomlevel )
|
gen_prime( unsigned int nbits, int secret, int randomlevel )
|
||||||
{
|
{
|
||||||
unsigned nlimbs;
|
unsigned nlimbs;
|
||||||
MPI prime, ptest, pminus1, val_2, val_3, result;
|
MPI prime, ptest, pminus1, val_2, val_3, result;
|
||||||
@ -304,6 +304,9 @@ gen_prime( unsigned nbits, int secret, int randomlevel )
|
|||||||
if( 0 && DBG_CIPHER )
|
if( 0 && DBG_CIPHER )
|
||||||
log_debug("generate a prime of %u bits ", nbits );
|
log_debug("generate a prime of %u bits ", nbits );
|
||||||
|
|
||||||
|
if (!nbits)
|
||||||
|
log_fatal ("trying to generate a prime of zero bits\n");
|
||||||
|
|
||||||
if( !no_of_small_prime_numbers ) {
|
if( !no_of_small_prime_numbers ) {
|
||||||
for(i=0; small_prime_numbers[i]; i++ )
|
for(i=0; small_prime_numbers[i]; i++ )
|
||||||
no_of_small_prime_numbers++;
|
no_of_small_prime_numbers++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user