summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/pyexpat.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 41d90d0f96..dcde292cb0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -345,6 +345,9 @@ Library
Extension Modules
-----------------
+- Issue #9054: Fix a crash occurring when using the pyexpat module
+ with expat version 2.0.1.
+
- Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression
introduced by issue #9324.
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index e05b3add02..0555b6d662 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -415,6 +415,9 @@ call_character_handler(xmlparseobject *self, const XML_Char *buffer, int len)
PyObject *args;
PyObject *temp;
+ if (!have_handler(self, CharacterData))
+ return -1;
+
args = PyTuple_New(1);
if (args == NULL)
return -1;