$OpenBSD: patch-Modules_pyexpat_c,v 1.2 2011/07/06 12:05:56 jasper Exp $
--- Modules/pyexpat.c.orig	Sun Oct 24 16:16:05 2010
+++ Modules/pyexpat.c	Wed Jul  6 14:05:41 2011
@@ -435,6 +435,11 @@ call_character_handler(xmlparseobject *self, const XML
                                     noop_character_data_handler);
         return -1;
     }
+    if (!have_handler(self, CharacterData)) {
+        Py_DECREF(args);
+        flag_error(self);
+        return -1;
+    }
     PyTuple_SET_ITEM(args, 0, temp);
     /* temp is now a borrowed reference; consider it unused. */
     self->in_callback = 1;
