summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-06 06:03:59 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-06 06:03:59 (GMT)
commit74bb783c2fd8084a835b6663abe5b70c55fa999d (patch)
tree811a824f29814e73172fb16bc2401c4c01b62814
parent314bef9fffff461444e56ccc97655bdf11e94a74 (diff)
downloadcpython-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/NEWS3
-rw-r--r--Modules/posixmodule.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index c0649ae..a010b0a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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");