This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ajaksu2
Recipients ajaksu2
Date 2008-08-27.23:30:11
SpamBayes Score 0.47212753
Marked as misclassified No
Message-id <1219879812.7.0.142620771907.issue3708@psf.upfronthosting.co.za>
In-reply-to
Content
Calling os.urandom(1 + float(x)) ends in a infinite loop due to a naive
condition check:

while len(bytes) < n:
    bytes += read(_urandomfd, n - len(bytes))

Trivial patch attached.
History
Date User Action Args
2008-08-27 23:30:12ajaksu2setrecipients: + ajaksu2
2008-08-27 23:30:12ajaksu2setmessageid: <1219879812.7.0.142620771907.issue3708@psf.upfronthosting.co.za>
2008-08-27 23:30:11ajaksu2linkissue3708 messages
2008-08-27 23:30:11ajaksu2create