[Python-checkins] python/dist/src/Python bltinmodule.c, 2.324, 2.325
birkenfeld@users.sourceforge.net
birkenfeld at users.sourceforge.net
Thu Sep 15 12:46:16 CEST 2005
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28578/Python
Modified Files:
bltinmodule.c
Log Message:
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.324
retrieving revision 2.325
diff -u -d -r2.324 -r2.325
--- bltinmodule.c 31 Aug 2005 22:21:15 -0000 2.324
+++ bltinmodule.c 15 Sep 2005 10:46:13 -0000 2.325
@@ -542,6 +542,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