]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add missing check of PyDict_Update()'s return value in _elementtree.c
authorChristian Heimes <christian@cheimes.de>
Sat, 20 Jul 2013 13:12:09 +0000 (15:12 +0200)
committerChristian Heimes <christian@cheimes.de>
Sat, 20 Jul 2013 13:12:09 +0000 (15:12 +0200)
CID 719637

Modules/_elementtree.c

index 9789527c39a6b1b1bdb612908af06ff4b45c8d97..c179e965da5ea62ea20fb92b704e181818f6b8e0 100644 (file)
@@ -347,7 +347,8 @@ get_attrib_from_keywords(PyObject *kwds)
     Py_DECREF(attrib_str);
 
     if (attrib)
-        PyDict_Update(attrib, kwds);
+        if (PyDict_Update(attrib, kwds) < 0)
+            return NULL;
     return attrib;
 }