diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-08 21:13:36 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-08 21:13:36 (GMT) |
| commit | 4678b2f44876774b29720913657bb6c65e77e259 (patch) | |
| tree | 932a5c013496a3a166ac9e572ba51c6e4c5ddd7f /Python | |
| parent | 2edd8a1e2cd22f8ba46e108ff213bec8c5f86459 (diff) | |
| parent | 70b72f0f96d0a78e7cb154ae64356c82d06ac901 (diff) | |
| download | cpython-4678b2f44876774b29720913657bb6c65e77e259.zip cpython-4678b2f44876774b29720913657bb6c65e77e259.tar.gz cpython-4678b2f44876774b29720913657bb6c65e77e259.tar.bz2 | |
Fixed possible abort in ceval loop if _PyUnicode_FromId() fails.
Every opcode should end with DISPATCH() or goto error.
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 0add7ec..b2c90cc 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2140,7 +2140,7 @@ _PyEval_EvalFrameDefault(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)) @@ -2652,7 +2652,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) /* do the same if locals() is not a dict */ PyObject *ann_str = _PyUnicode_FromId(&PyId___annotations__); if (ann_str == NULL) { - break; + goto error; } ann_dict = PyObject_GetItem(f->f_locals, ann_str); if (ann_dict == NULL) { |
