Commits

Georg Brandl committed ae5b8a8

Bug #1551427: fix a wrong NULL pointer check in the win32 version
of os.urandom().
(backport from rev. 51762)

  • Participants
  • Parent commits 9deb08e
  • Branches 2.5

Comments (0)

Files changed (2)

 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.

File Modules/posixmodule.c

 
 		pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress(
 						hAdvAPI32, "CryptGenRandom");
-		if (pCryptAcquireContext == NULL)
+		if (pCryptGenRandom == NULL)
 			return PyErr_Format(PyExc_NotImplementedError,
 					    "CryptGenRandom not found");