diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 6af6e513d5e..f18e1546eb0 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -8250,6 +8250,7 @@ win32_urandom(PyObject *self, PyObject *args) result = PyString_FromStringAndSize(NULL, howMany); if (result != NULL) { /* Get random data */ + memset(PyString_AS_STRING(result), 0, howMany); /* zero seed */ if (! pCryptGenRandom(hCryptProv, howMany, (unsigned char*) PyString_AS_STRING(result))) { Py_DECREF(result);