summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-06 23:33:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-06 23:33:52 (GMT)
commite66987e626cfce8292c39d5b1394665e8aa6840b (patch)
treeec94354a9ccb2f09e77e3a2381b52142544d0ee2 /Modules/posixmodule.c
parente256accd46af74d2695117e62361fe7ae9dfdfe3 (diff)
downloadcpython-e66987e626cfce8292c39d5b1394665e8aa6840b.zip
cpython-e66987e626cfce8292c39d5b1394665e8aa6840b.tar.gz
cpython-e66987e626cfce8292c39d5b1394665e8aa6840b.tar.bz2
os.urandom() now blocks on Linux
Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer until the system urandom entropy pool is initialized to increase the security. This change is part of the PEP 524.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2dc6d7b..0b9b3f6 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -11168,8 +11168,7 @@ os_urandom_impl(PyObject *module, Py_ssize_t size)
if (bytes == NULL)
return NULL;
- result = _PyOS_URandom(PyBytes_AS_STRING(bytes),
- PyBytes_GET_SIZE(bytes));
+ result = _PyOS_URandom(PyBytes_AS_STRING(bytes), PyBytes_GET_SIZE(bytes));
if (result == -1) {
Py_DECREF(bytes);
return NULL;