diff Python/ceval.c @ 84726:13d5b245ca14 3.3

Add missing check of PyDict_SetItem()'s return value in PyEval_EvalCodeEx() CID 486647
author Christian Heimes <christian@cheimes.de>
date Sat, 20 Jul 2013 14:48:10 +0200
parents 2b4b289c1abb
children 2aee9c41bb79 29c6fe41e7f1
line wrap: on
line diff
--- a/Python/ceval.c	Fri Jul 19 22:53:42 2013 +0100
+++ b/Python/ceval.c	Sat Jul 20 14:48:10 2013 +0200
@@ -3333,7 +3333,9 @@
                          keyword);
             goto fail;
         }
-        PyDict_SetItem(kwdict, keyword, value);
+        if (PyDict_SetItem(kwdict, keyword, value) == -1) {
+            goto fail;
+        }
         continue;
       kw_found:
         if (GETLOCAL(j) != NULL) {