]> granicus.if.org Git - python/commitdiff
Merged revisions 85536 via svnmerge from
authorGeorg Brandl <georg@python.org>
Sun, 24 Oct 2010 14:16:05 +0000 (14:16 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 24 Oct 2010 14:16:05 +0000 (14:16 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85536 | georg.brandl | 2010-10-15 18:26:08 +0200 (Fr, 15 Okt 2010) | 1 line

  #9054: fix crash when using pyexpat with a system expat lib version 2.0.1.
........

Misc/NEWS
Modules/pyexpat.c

index 41d90d0f967f72efe6a9b481ae1fd1fe594a87d4..dcde292cb009a23d2ca86e4d81e3bb126da5eea8 100644 (file)
--- 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.
 
index e05b3add020241c9afbf9e96414363ac737c6d98..0555b6d662a806d3c44191480b7b47890ae083c4 100644 (file)
@@ -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;