[Python-checkins] CVS: python/dist/src/Python marshal.c,1.66,1.67

Michael Hudson mwh@users.sourceforge.net
2001年8月30日 07:50:22 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv20449
Modified Files:
	marshal.c 
Log Message:
fix for part of bug #453523: disable unmarshalling of code objects in 
restricted execution mode.
Index: marshal.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/marshal.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** marshal.c	2001年08月29日 02:28:41	1.66
--- marshal.c	2001年08月30日 14:50:20	1.67
***************
*** 570,574 ****
 
 	case TYPE_CODE:
! 		{
 			int argcount = r_short(p);
 			int nlocals = r_short(p);
--- 570,580 ----
 
 	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);

AltStyle によって変換されたページ (->オリジナル) /