]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx()
authorChristian Heimes <christian@cheimes.de>
Sat, 20 Jul 2013 12:48:10 +0000 (14:48 +0200)
committerChristian Heimes <christian@cheimes.de>
Sat, 20 Jul 2013 12:48:10 +0000 (14:48 +0200)
CID 486647

Python/ceval.c

index e59c39ddd7e186ffc16ff6654250e87eb05c3b20..d28ae2ba0511314ed954b517db7968385b2aff2d 100644 (file)
@@ -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) {