web/modules/pxt/PXT/Utils.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 603e60a69723437aa6a989f646c1a7160800dec8 Author: Jan Pazdziora jpazdziora@redhat.com Date: Fri Feb 18 10:01:26 2011 +0100
Localize the RANDOM; also use three-parameter open.
diff --git a/web/modules/pxt/PXT/Utils.pm b/web/modules/pxt/PXT/Utils.pm index 3a6b293..5b29446 100644 --- a/web/modules/pxt/PXT/Utils.pm +++ b/web/modules/pxt/PXT/Utils.pm @@ -272,7 +272,8 @@ sub random_bits { my $class = shift; my $n = shift;
- open(RANDOM, '/dev/urandom') or die 'could not open /dev/urandom for reading!'; + local * RANDOM; + open(RANDOM, '<', '/dev/urandom') or die 'could not open /dev/urandom for reading!'; binmode(RANDOM); my $rand_data; my $result = read(RANDOM, $rand_data, $n >> 3);
spacewalk-commits@lists.fedorahosted.org