previous fix for #124044 was broken, correct fix provided. fix

* python/libxml.c: previous fix for #124044 was broken, correct
  fix provided.
* HTMLparser.c parser.c parserInternals.c xmlIO.c: fix xmlStopParser()
  and the error handlers to address #125877
Daniel
diff --git a/xmlIO.c b/xmlIO.c
index f93c497..33c544b 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -409,6 +409,9 @@
     void *data = NULL;
     xmlErrorLevel level = XML_ERR_ERROR;
 
+    if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
+        (ctxt->instate == XML_PARSER_EOF))
+	return;
     if ((ctxt != NULL) && (ctxt->sax != NULL)) {
         if (ctxt->validate) {
 	    channel = ctxt->sax->error;