1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 09:37:34 -05:00

Improve robustness in random seed file handling.

[originally from svn r2200]
This commit is contained in:
Simon Tatham
2002-11-07 20:01:04 +00:00
parent 7c95ea19c8
commit a1125a8052
4 changed files with 16 additions and 3 deletions

View File

@ -40,6 +40,8 @@ void noise_get_heavy(void (*func) (void *, int))
}
read_random_seed(func);
/* Update the seed immediately, in case another instance uses it. */
random_save_seed();
gsps = NULL;
mod = GetModuleHandle("KERNEL32");
@ -56,6 +58,7 @@ void random_save_seed(void)
if (random_active) {
random_get_savedata(&data, &len);
write_random_seed(data, len);
sfree(data);
}
}