python/dist/src/Modules pyexpat.c, 2.89.2.1, 2.89.2.2
Update of /cvsroot/python/python/dist/src/Modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12823/Modules Modified Files: Tag: release24-maint pyexpat.c Log Message: - Patch #1309009, Fix segfault in pyexpat when the XML document is in latin_1, but Python incorrectly assumes it is in UTF-8 format Index: pyexpat.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v retrieving revision 2.89.2.1 retrieving revision 2.89.2.2 diff -u -d -r2.89.2.1 -r2.89.2.2 --- pyexpat.c 4 Mar 2005 14:38:07 -0000 2.89.2.1 +++ pyexpat.c 30 Sep 2005 04:58:23 -0000 2.89.2.2 @@ -417,6 +417,9 @@ { PyObject *result = STRING_CONV_FUNC(str); PyObject *value; + /* result can be NULL if the unicode conversion failed. */ + if (!result) + return result; if (!self->intern) return result; value = PyDict_GetItem(self->intern, result); @@ -572,7 +575,9 @@ Py_DECREF(v); } } - args = Py_BuildValue("(NN)", string_intern(self, name), container); + args = string_intern(self, name); + if (args != NULL) + args = Py_BuildValue("(NN)", args, container); if (args == NULL) { Py_DECREF(container); return;
participants (1)
-
nnorwitz@users.sourceforge.net