$OpenBSD: patch-Modules_pyexpat_c,v 1.1.1.1 2013/04/28 01:29:57 fgsch Exp $
--- Modules/pyexpat.c.orig	Sat Apr  6 08:41:54 2013
+++ Modules/pyexpat.c	Mon Apr 22 18:35:57 2013
@@ -366,6 +366,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;
