mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Improve robustness in random seed file handling.
[originally from svn r2200]
This commit is contained in:
@ -201,7 +201,10 @@ int random_byte(void)
|
||||
|
||||
void random_get_savedata(void **data, int *len)
|
||||
{
|
||||
void *buf = smalloc(POOLSIZE / 2);
|
||||
random_stir();
|
||||
*data = pool.pool + pool.poolpos;
|
||||
memcpy(buf, pool.pool + pool.poolpos, POOLSIZE / 2);
|
||||
*len = POOLSIZE / 2;
|
||||
*data = buf;
|
||||
random_stir();
|
||||
}
|
||||
|
Reference in New Issue
Block a user