mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.11] gh-105979: Fix exception handling in unmarshal_frozen_code (Python/import.c
) (GH-105980). (#106100)
* [3.11] gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980).
(cherry picked from commit cd5280367a
)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
This commit is contained in:
parent
8c792749cb
commit
307c59a0c1
3 changed files with 10 additions and 0 deletions
|
@ -1327,6 +1327,7 @@ unmarshal_frozen_code(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