[Python-checkins] python/dist/src/Python bltinmodule.c, 2.318.2.2, 2.318.2.3
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Thu Sep 15 12:46:21 CEST 2005
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28585/Python
Modified Files:
Tag: release24-maint
bltinmodule.c
Log Message:
backport bug [ 868706 ] Calling builtin function 'eval' from C causes seg fault.
Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.318.2.2
retrieving revision 2.318.2.3
diff -u -d -r2.318.2.2 -r2.318.2.3
--- bltinmodule.c 21 Aug 2005 11:09:58 -0000 2.318.2.2
+++ bltinmodule.c 15 Sep 2005 10:46:18 -0000 2.318.2.3
@@ -479,6 +479,13 @@
else if (locals == Py_None)
locals = globals;
+ if (globals == NULL || locals == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "eval must be given globals and locals "
+ "when called without a frame");
+ return NULL;
+ }
+
if (PyDict_GetItemString(globals, "__builtins__") == NULL) {
if (PyDict_SetItemString(globals, "__builtins__",
PyEval_GetBuiltins()) != 0)
More information about the Python-checkins
mailing list