diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-11 08:38:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 08:38:03 +0200 |
commit | 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6 (patch) | |
tree | 5b7afcdceab6dae37e3db90f952c5c76fe46b5cf /Python/ceval.c | |
parent | bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d (diff) | |
download | cpython-git-8905fcc85a6fc3ac394bc89b0bbf40897e9497a6.tar.gz |
bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)
* bpo-35454: Fix miscellaneous minor issues in error handling.
* Fix a null pointer dereference.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index ebe1c50e7b..de6ff29945 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -5109,7 +5109,7 @@ unicode_concatenate(PyObject *v, PyObject *w, PyObject *names = f->f_code->co_names; PyObject *name = GETITEM(names, oparg); PyObject *locals = f->f_locals; - if (PyDict_CheckExact(locals) && + if (locals && PyDict_CheckExact(locals) && PyDict_GetItem(locals, name) == v) { if (PyDict_DelItem(locals, name) != 0) { PyErr_Clear(); |