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.

classification
Title: Trivial fix for obscure bug in os.urandom()
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, nickm
Priority: high Keywords:

Created on 2004-09-03 04:00 by nickm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg22310 - (view) Author: Nick Mathewson (nickm) Date: 2004-09-03 04:00
The new os.urandom function checks for whether it has
set _urandomfd with "if not _urandomfd:" .  But this is
incorrect; on some systems, if fd 0 has been closed, it
is possible for _urandomfd to be 0.  Instead, the check
should be "if _urandomfd is None".
msg22311 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-09-18 16:08
Logged In: YES 
user_id=21627

Thanks, committed as os.py 1.82.
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40858
2004-09-03 04:00:16nickmcreate