Commit 5bdfbd0b authored by Christian Heimes's avatar Christian Heimes

Issue #18426: Fix NULL pointer dereference in C extension import when

PyModule_GetDef() returns an error.
parent 07fbe805
......@@ -12,6 +12,9 @@ What's New in Python 3.3.3 release candidate 1?
Core and Builtins
-----------------
- Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.
- Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
tstate is first removed from TLS and then deallocated.
......
......@@ -97,6 +97,8 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
/* Remember pointer to module init function. */
def = PyModule_GetDef(m);
if (def == NULL)
goto error;
def->m_base.m_init = p;
/* Remember the filename as the __file__ attribute */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment