mirror of https://github.com/python/cpython.git
Issue #19437: Fix PyImport_ImportModuleLevelObject(), handle
PyUnicode_Substring() failure (ex: MemoryError)
This commit is contained in:
parent
d3e83e2a3e
commit
22af2599a9
|
@ -1364,7 +1364,11 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *given_globals,
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
base = PyUnicode_Substring(package, 0, last_dot);
|
||||
if (base == NULL)
|
||||
goto error;
|
||||
|
||||
if (PyUnicode_GET_LENGTH(name) > 0) {
|
||||
PyObject *borrowed_dot, *seq = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue