]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 8 Nov 2016 21:12:46 +0000 (23:12 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 8 Nov 2016 21:12:46 +0000 (23:12 +0200)
Every opcode should end with DISPATCH() or goto error.

Python/ceval.c

index e9d0cbb97631f520f770a7b5d114b230e099d773..7b405188d38c662696fcd1638bac05767a8b698f 100644 (file)
@@ -2196,7 +2196,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
             else {
                 PyObject *build_class_str = _PyUnicode_FromId(&PyId___build_class__);
                 if (build_class_str == NULL)
-                    break;
+                    goto error;
                 bc = PyObject_GetItem(f->f_builtins, build_class_str);
                 if (bc == NULL) {
                     if (PyErr_ExceptionMatches(PyExc_KeyError))