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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ef710e40f116a8d15c074f0682bfdf2521bbe23;p=python Add missing check of PyDict_Update()'s return value in _elementtree.c CID 719637 --- 2ef710e40f116a8d15c074f0682bfdf2521bbe23 diff --cc Modules/_elementtree.c index 28bdf1effe,c179e965da..d488f01b80 --- 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; }