From: Christian Heimes Date: Sat, 20 Jul 2013 13:12:19 +0000 (+0200) Subject: Add missing check of PyDict_Update()'s return value in _elementtree.c X-Git-Tag: v3.4.0a1~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ef710e40f116a8d15c074f0682bfdf2521bbe23;p=thirdparty%2FPython%2Fcpython.git Add missing check of PyDict_Update()'s return value in _elementtree.c CID 719637 --- 2ef710e40f116a8d15c074f0682bfdf2521bbe23 diff --cc Modules/_elementtree.c index 28bdf1effebf,c179e965da5e..d488f01b803a --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@@ -308,9 -346,9 +308,10 @@@ get_attrib_from_keywords(PyObject *kwds Py_DECREF(attrib_str); + /* attrib can be NULL if PyDict_New failed */ if (attrib) - PyDict_Update(attrib, kwds); + if (PyDict_Update(attrib, kwds) < 0) + return NULL; return attrib; }