mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-126654: Fix crash in several functions in _interpreters module (#126678)
This commit is contained in:
parent
6ee542d491
commit
9fc2808eaf
3 changed files with 25 additions and 0 deletions
|
|
@ -936,6 +936,11 @@ static int
|
|||
_interp_exec(PyObject *self, PyInterpreterState *interp,
|
||||
PyObject *code_arg, PyObject *shared_arg, PyObject **p_excinfo)
|
||||
{
|
||||
if (shared_arg != NULL && !PyDict_CheckExact(shared_arg)) {
|
||||
PyErr_SetString(PyExc_TypeError, "expected 'shared' to be a dict");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Extract code.
|
||||
Py_ssize_t codestrlen = -1;
|
||||
PyObject *bytes_obj = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue