From b627430ae60d7c5f13ecc2f289bce8185c218be0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 30 Sep 2014 20:30:06 +0300 Subject: Make sure we don't waste entropy --- system/core/Security.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system/core/Security.php') diff --git a/system/core/Security.php b/system/core/Security.php index 4b204ad95..b97df4647 100755 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -573,6 +573,7 @@ class CI_Security { if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) { + stream_set_chunk_size($fp, $length); $output = fread($fp, $length); fclose($fp); if ($output !== FALSE) -- cgit v1.2.3-24-g4f1b