diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:48:21 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:48:21 (GMT) |
commit | 895bdfb16ef87499d08342294d0f818914e85f66 (patch) | |
tree | 3b0982c60400b023e505f439db0de1d464564c61 /Python/ceval.c | |
parent | de4d1839553cd967745f67c2de7c125587185bd4 (diff) | |
parent | 0bd447f847f285dc8f0179a03d224c4b17c8df34 (diff) | |
download | cpython-895bdfb16ef87499d08342294d0f818914e85f66.zip cpython-895bdfb16ef87499d08342294d0f818914e85f66.tar.gz cpython-895bdfb16ef87499d08342294d0f818914e85f66.tar.bz2 |
Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()
CID 486647
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 8a732a0..837b7c1 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3461,7 +3461,9 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals, keyword); goto fail; } - PyDict_SetItem(kwdict, keyword, value); + if (PyDict_SetItem(kwdict, keyword, value) == -1) { + goto fail; + } continue; kw_found: if (GETLOCAL(j) != NULL) { |