SF bug #1296433 (Expat bug #1515266): Unchecked calls to character data
handler would cause a segfault. This merges in Expat's lib/xmlparse.c
revisions 1.154 and 1.155, which fix this and a closely related problem
(the later does not affect Python).
Moved the crasher test to the tests for xml.parsers.expat.
diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c
index 882470d..f8fc027 100644
--- a/Modules/expat/xmlparse.c
+++ b/Modules/expat/xmlparse.c
@@ -2552,6 +2552,8 @@
(int)(dataPtr - (ICHAR *)dataBuf));
if (s == next)
break;
+ if (ps_parsing == XML_FINISHED || ps_parsing == XML_SUSPENDED)
+ break;
*eventPP = s;
}
}