mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 10:44:04 +02:00
Read /dev/urandom unbuffered
To avoid wasting entropy. Bug 593232.
This commit is contained in:
@@ -181,6 +181,7 @@ g_rand_new (void)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
setvbuf (dev_urandom, NULL, _IONBF, 0);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
Reference in New Issue
Block a user