amaury.forgeotdarc
2008-07-21 21:13:14 UTC
Author: amaury.forgeotdarc
Date: Mon Jul 21 23:13:14 2008
New Revision: 65175
Log:
Merged revisions 65174 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r65174 | amaury.forgeotdarc | 2008-07-21 23:06:46 +0200 (lun., 21 juil. 2008) | 3 lines
On Windows, silence a Purify warning and initialize the memory passed to CryptGenRandom.
Since python doesn't provide any particular random data, it seems more reasonable anyway.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Mon Jul 21 23:13:14 2008
@@ -6690,6 +6690,7 @@
result = PyBytes_FromStringAndSize(NULL, howMany);
if (result != NULL) {
/* Get random data */
+ memset(PyBytes_AS_STRING(result), 0, howMany); /* zero seed */
if (! pCryptGenRandom(hCryptProv, howMany, (unsigned char*)
PyBytes_AS_STRING(result))) {
Py_DECREF(result);
Date: Mon Jul 21 23:13:14 2008
New Revision: 65175
Log:
Merged revisions 65174 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk
........
r65174 | amaury.forgeotdarc | 2008-07-21 23:06:46 +0200 (lun., 21 juil. 2008) | 3 lines
On Windows, silence a Purify warning and initialize the memory passed to CryptGenRandom.
Since python doesn't provide any particular random data, it seems more reasonable anyway.
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Mon Jul 21 23:13:14 2008
@@ -6690,6 +6690,7 @@
result = PyBytes_FromStringAndSize(NULL, howMany);
if (result != NULL) {
/* Get random data */
+ memset(PyBytes_AS_STRING(result), 0, howMany); /* zero seed */
if (! pCryptGenRandom(hCryptProv, howMany, (unsigned char*)
PyBytes_AS_STRING(result))) {
Py_DECREF(result);