X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshrand.c;h=a7b3dc4eced186a9a033ab744887c39426b4a644;hb=92f3b101f550c164953b4a490e706ebd0d9f1374;hp=524bbd43e57072584f9f9c2b7466a7cb2e474100;hpb=d36a4c3685f17057ba2c80ac471c1284b615469f;p=PuTTY.git diff --git a/sshrand.c b/sshrand.c index 524bbd43..a7b3dc4e 100644 --- a/sshrand.c +++ b/sshrand.c @@ -184,12 +184,14 @@ static void random_add_heavynoise_bitbybit(void *noise, int length) void random_init(void) { - memset(&pool, 0, sizeof(pool)); /* just to start with */ + if (!random_active) { + memset(&pool, 0, sizeof(pool)); /* just to start with */ - random_active = 1; + random_active = 1; - noise_get_heavy(random_add_heavynoise_bitbybit); - random_stir(); + noise_get_heavy(random_add_heavynoise_bitbybit); + random_stir(); + } } int random_byte(void)