diff options
Diffstat (limited to 'pipermail/pycrypto/attachments/20120120/7b674eb6/attachment-0001.diff')
-rw-r--r-- | pipermail/pycrypto/attachments/20120120/7b674eb6/attachment-0001.diff | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pipermail/pycrypto/attachments/20120120/7b674eb6/attachment-0001.diff b/pipermail/pycrypto/attachments/20120120/7b674eb6/attachment-0001.diff new file mode 100644 index 0000000..55a037a --- /dev/null +++ b/pipermail/pycrypto/attachments/20120120/7b674eb6/attachment-0001.diff @@ -0,0 +1,16 @@ +diff --git a/lib/Crypto/Random/OSRNG/posix.py b/lib/Crypto/Random/OSRNG/posix.py +index f88cd77..4661708 100644 +--- a/lib/Crypto/Random/OSRNG/posix.py ++++ b/lib/Crypto/Random/OSRNG/posix.py +@@ -54,7 +54,10 @@ class DevURandomRNG(BaseRNG): + self.__file.close() + + def _read(self, N): +- return self.__file.read(N) ++ data = self.__file.read(N) ++ while len(data) < N: ++ data += self.__file.read(N - len(data)) ++ return data + + def new(*args, **kwargs): + return DevURandomRNG(*args, **kwargs) |