mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #18426: Fix NULL pointer dereference in C extension import when
PyModule_GetDef() returns an error.
This commit is contained in:
commit
5ec44649df
2 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #18426: Fix NULL pointer dereference in C extension import when
|
||||||
|
PyModule_GetDef() returns an error.
|
||||||
|
|
||||||
- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
|
- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
|
||||||
a stack overflow in the marshal module (fix a crash in test_marshal).
|
a stack overflow in the marshal module (fix a crash in test_marshal).
|
||||||
Patch written by Jeremy Kloth.
|
Patch written by Jeremy Kloth.
|
||||||
|
|
|
@ -97,6 +97,8 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
|
||||||
|
|
||||||
/* Remember pointer to module init function. */
|
/* Remember pointer to module init function. */
|
||||||
def = PyModule_GetDef(m);
|
def = PyModule_GetDef(m);
|
||||||
|
if (def == NULL)
|
||||||
|
goto error;
|
||||||
def->m_base.m_init = p;
|
def->m_base.m_init = p;
|
||||||
|
|
||||||
/* Remember the filename as the __file__ attribute */
|
/* Remember the filename as the __file__ attribute */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue