summaryrefslogtreecommitdiffstats
path: root/Modules/expat
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2006-07-01 16:28:20 (GMT)
committerFred Drake <fdrake@acm.org>2006-07-01 16:28:20 (GMT)
commit6ffe499397acfe916202e3e46adfa868e6a307b9 (patch)
tree4b6104be38e351c8d9bf0ba5d22ba4dac287d08f /Modules/expat
parent7596e8342ea34108d773d1802d5147e9884b547f (diff)
downloadcpython-6ffe499397acfe916202e3e46adfa868e6a307b9.zip
cpython-6ffe499397acfe916202e3e46adfa868e6a307b9.tar.gz
cpython-6ffe499397acfe916202e3e46adfa868e6a307b9.tar.bz2
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.
Diffstat (limited to 'Modules/expat')
-rw-r--r--Modules/expat/xmlparse.c2
1 files changed, 2 insertions, 0 deletions
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 @@ doContent(XML_Parser parser,
(int)(dataPtr - (ICHAR *)dataBuf));
if (s == next)
break;
+ if (ps_parsing == XML_FINISHED || ps_parsing == XML_SUSPENDED)
+ break;
*eventPP = s;
}
}