summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-20 12:48:21 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-20 12:48:21 (GMT)
commit895bdfb16ef87499d08342294d0f818914e85f66 (patch)
tree3b0982c60400b023e505f439db0de1d464564c61
parentde4d1839553cd967745f67c2de7c125587185bd4 (diff)
parent0bd447f847f285dc8f0179a03d224c4b17c8df34 (diff)
downloadcpython-895bdfb16ef87499d08342294d0f818914e85f66.zip
cpython-895bdfb16ef87499d08342294d0f818914e85f66.tar.gz
cpython-895bdfb16ef87499d08342294d0f818914e85f66.tar.bz2
Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()
CID 486647
-rw-r--r--Python/ceval.c4
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) {