projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c0fc84
)
fix for part of bug #453523: disable unmarshalling of code objects in
author
Michael W. Hudson
<mwh@python.net>
Thu, 30 Aug 2001 14:50:20 +0000
(14:50 +0000)
committer
Michael W. Hudson
<mwh@python.net>
Thu, 30 Aug 2001 14:50:20 +0000
(14:50 +0000)
restricted execution mode.
Python/marshal.c
patch
|
blob
|
history
diff --git
a/Python/marshal.c
b/Python/marshal.c
index 029f2b996df74634ee7d7914f2c062d7072d6623..944ae35a0c1f4373f0458785d8f1afac58bac0f0 100644
(file)
--- a/
Python/marshal.c
+++ b/
Python/marshal.c
@@
-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);