diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-08 21:14:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-08 21:14:00 (GMT) |
commit | 818b5cc6db81b32c25d7710fa07453d7045fafa8 (patch) | |
tree | 005a17929f553b9d53f1bb1e65cded3d903e7758 /Python/ceval.c | |
parent | 0ee446c8941cbc169230fc098bec5dfb9a56c0b9 (diff) | |
parent | 4678b2f44876774b29720913657bb6c65e77e259 (diff) | |
download | cpython-818b5cc6db81b32c25d7710fa07453d7045fafa8.zip cpython-818b5cc6db81b32c25d7710fa07453d7045fafa8.tar.gz cpython-818b5cc6db81b32c25d7710fa07453d7045fafa8.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/ceval.c')
-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 6b05de6..6cc6dfc 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2146,7 +2146,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)) @@ -2658,7 +2658,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) { |