diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:48:10 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:48:10 (GMT) |
commit | 0bd447f847f285dc8f0179a03d224c4b17c8df34 (patch) | |
tree | 2610da4b7d3d33695f845519d637bd4780d04614 /Python | |
parent | 14f5ee0a62e59a25d03c51e282e6f3727d0ea34d (diff) | |
download | cpython-0bd447f847f285dc8f0179a03d224c4b17c8df34.zip cpython-0bd447f847f285dc8f0179a03d224c4b17c8df34.tar.gz cpython-0bd447f847f285dc8f0179a03d224c4b17c8df34.tar.bz2 |
Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()
CID 486647
Diffstat (limited to 'Python')
-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 e59c39d..d28ae2b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3333,7 +3333,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) { |