Bug #1551427: fix a wrong NULL pointer check in the win32 version

of os.urandom().
This commit is contained in:
Georg Brandl 2006-09-06 06:03:59 +00:00
parent 314bef9fff
commit 74bb783c2f
2 changed files with 4 additions and 1 deletions

View 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");