diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-13 10:48:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-13 10:48:55 (GMT) |
commit | a00064576ac9365f1c619a632348b08a894b4395 (patch) | |
tree | 27c649e11353f63b7c4e0989dc99f99fb9f07eaa /Python/ceval.c | |
parent | 8060399654980d2c5dc91883ce4505c9fc376277 (diff) | |
download | cpython-a00064576ac9365f1c619a632348b08a894b4395.zip cpython-a00064576ac9365f1c619a632348b08a894b4395.tar.gz cpython-a00064576ac9365f1c619a632348b08a894b4395.tar.bz2 |
ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 48b5678..f85f33a 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1232,6 +1232,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) PyObject *error_type, *error_value, *error_traceback; PyErr_Fetch(&error_type, &error_value, &error_traceback); filename = _PyUnicode_AsString(co->co_filename); + if (filename == NULL && tstate->overflowed) { + /* maximum recursion depth exceeded */ + goto exit_eval_frame; + } PyErr_Restore(error_type, error_value, error_traceback); } #endif |