mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-105979: Fix exception handling in unmarshal_frozen_code
(Python/import.c
) (#105980)
This commit is contained in:
parent
46a3190fcf
commit
cd5280367a
3 changed files with 10 additions and 0 deletions
|
@ -2071,6 +2071,7 @@ unmarshal_frozen_code(PyInterpreterState *interp, struct frozen_info *info)
|
|||
PyObject *co = PyMarshal_ReadObjectFromString(info->data, info->size);
|
||||
if (co == NULL) {
|
||||
/* Does not contain executable code. */
|
||||
PyErr_Clear();
|
||||
set_frozen_error(FROZEN_INVALID, info->nameobj);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue