summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-15 16:26:08 (GMT)
committerGeorg Brandl <georg@python.org>2010-10-15 16:26:08 (GMT)
commitc01537f742c3d2591016ef29bb20e3a26482be78 (patch)
tree8bfbae8edc301dd336c4f856cc030b33f895e040 /Modules
parent6c6a4d02491124453d305262e53e8e6d71a9158b (diff)
downloadcpython-c01537f742c3d2591016ef29bb20e3a26482be78.zip
cpython-c01537f742c3d2591016ef29bb20e3a26482be78.tar.gz
cpython-c01537f742c3d2591016ef29bb20e3a26482be78.tar.bz2
#9054: fix crash when using pyexpat with a system expat lib version 2.0.1.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index a8b0f8f..5aadcc0 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -351,6 +351,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;