diff options
author | Georg Brandl <georg@python.org> | 2006-09-06 06:03:59 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-09-06 06:03:59 (GMT) |
commit | 74bb783c2fd8084a835b6663abe5b70c55fa999d (patch) | |
tree | 811a824f29814e73172fb16bc2401c4c01b62814 | |
parent | 314bef9fffff461444e56ccc97655bdf11e94a74 (diff) | |
download | cpython-74bb783c2fd8084a835b6663abe5b70c55fa999d.zip cpython-74bb783c2fd8084a835b6663abe5b70c55fa999d.tar.gz cpython-74bb783c2fd8084a835b6663abe5b70c55fa999d.tar.bz2 |
Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/posixmodule.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -41,6 +41,9 @@ Library Extension Modules ----------------- +- Bug #1551427: fix a wrong NULL pointer check in the win32 version + of os.urandom(). + - Bug #1548092: fix curses.tparm seg fault on invalid input. - Bug #1550714: fix SystemError from itertools.tee on negative value for n. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 5c67be6..45ea988 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -7877,7 +7877,7 @@ win32_urandom(PyObject *self, PyObject *args) pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress( hAdvAPI32, "CryptGenRandom"); - if (pCryptAcquireContext == NULL) + if (pCryptGenRandom == NULL) return PyErr_Format(PyExc_NotImplementedError, "CryptGenRandom not found"); |