]> granicus.if.org Git - python/commitdiff
Bug #1551427: fix a wrong NULL pointer check in the win32 version
authorGeorg Brandl <georg@python.org>
Wed, 6 Sep 2006 06:03:59 +0000 (06:03 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 6 Sep 2006 06:03:59 +0000 (06:03 +0000)
of os.urandom().

Misc/NEWS
Modules/posixmodule.c

index c0649ae6dfa5cf0f18a6962ed757b5a7e15644df..a010b0a22d1cc426a82ea75fe437b2ef959b846d 100644 (file)
--- 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.
index 5c67be6dc08e4df0e308ad8b9a4769b0badb2ae0..45ea9886ebf40ca151b68e8f16e53c471ee0c41b 100644 (file)
@@ -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");