From 70b72f0f96d0a78e7cb154ae64356c82d06ac901 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 8 Nov 2016 23:12:46 +0200 Subject: [PATCH] Fixed possible abort in ceval loop if _PyUnicode_FromId() fails. Every opcode should end with DISPATCH() or goto error. --- Python/ceval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/ceval.c b/Python/ceval.c index e9d0cbb9763..7b405188d38 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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))