mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
Check random_get_bytes() result before writing entropy file
This commit is contained in:
parent
6cd930cb3c
commit
15f0961447
@ -358,7 +358,8 @@ static void random_write_entropy(void)
|
||||
if (!random_entropy_file)
|
||||
return;
|
||||
|
||||
random_get_bytes(buf, RANDOM_ENTROPY_SIZE);
|
||||
if (random_get_bytes(buf, RANDOM_ENTROPY_SIZE) < 0)
|
||||
return;
|
||||
|
||||
f = fopen(random_entropy_file, "wb");
|
||||
if (f == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user