fix for part of bug #453523: disable unmarshalling of code objects in

restricted execution mode.
This commit is contained in:
Michael W. Hudson 2001-08-30 14:50:20 +00:00
parent 3c0fc84b15
commit 8019913e4a
1 changed files with 7 additions and 1 deletions

View File

@ -569,7 +569,13 @@ r_object(RFILE *p)
return v;
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 nlocals = r_short(p);
int stacksize = r_short(p);