mirror of
https://github.com/python/cpython.git
synced 2025-09-22 00:12:56 +00:00
fix for part of bug #453523: disable unmarshalling of code objects in
restricted execution mode.
This commit is contained in:
parent
3c0fc84b15
commit
8019913e4a
1 changed files with 7 additions and 1 deletions
|
@ -569,7 +569,13 @@ r_object(RFILE *p)
|
||||||
return v;
|
return v;
|
||||||
|
|
||||||
case TYPE_CODE:
|
case TYPE_CODE:
|
||||||
{
|
if (PyEval_GetRestricted()) {
|
||||||
|
PyErr_SetString(PyExc_RuntimeError,
|
||||||
|
"cannot unmarshal code objects in "
|
||||||
|
"restricted execution mode");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
int argcount = r_short(p);
|
int argcount = r_short(p);
|
||||||
int nlocals = r_short(p);
|
int nlocals = r_short(p);
|
||||||
int stacksize = r_short(p);
|
int stacksize = r_short(p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue