mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +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:
parent
1ca821cfb1
commit
06e9857f89
10
sshrand.c
10
sshrand.c
@ -184,12 +184,14 @@ static void random_add_heavynoise_bitbybit(void *noise, int length)
|
|||||||
|
|
||||||
void random_init(void)
|
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);
|
noise_get_heavy(random_add_heavynoise_bitbybit);
|
||||||
random_stir();
|
random_stir();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int random_byte(void)
|
int random_byte(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user