1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

random_init() should be called at most once during the running of

PuTTY, even if it's managing multiple sessions.

[originally from svn r4900]
This commit is contained in:
Simon Tatham 2004-11-24 19:53:31 +00:00
parent 1ca821cfb1
commit 06e9857f89

View File

@ -184,6 +184,7 @@ static void random_add_heavynoise_bitbybit(void *noise, int length)
void random_init(void)
{
if (!random_active) {
memset(&pool, 0, sizeof(pool)); /* just to start with */
random_active = 1;
@ -191,6 +192,7 @@ void random_init(void)
noise_get_heavy(random_add_heavynoise_bitbybit);
random_stir();
}
}
int random_byte(void)
{