fix a first arg error in SAX callback pointed out by Mike Hommey, and

* parser.c: fix a first arg error in SAX callback pointed out by
  Mike Hommey, and another one still hanging around. Should fix #342737
Daniel
diff --git a/ChangeLog b/ChangeLog
index e3ddc1f..680c2cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 12 14:52:38 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+	* parser.c: fix a first arg error in SAX callback pointed out by
+	  Mike Hommey, and another one still hanging around. Should fix #342737
+
 Wed Oct 11 23:11:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
 
 	* include/libxml/xmlversion.h.in: fix comment on versions
diff --git a/parser.c b/parser.c
index 90d608a..afbab5f 100644
--- a/parser.c
+++ b/parser.c
@@ -6376,7 +6376,7 @@
 			if ((ctxt->inSubset == 0) &&
 		            (ctxt->sax != NULL) &&
 		            (ctxt->sax->reference != NULL)) {
-			    ctxt->sax->reference(ctxt, name);
+			    ctxt->sax->reference(ctxt->userData, name);
 			}
 		    }
 		    ctxt->valid = 0;
@@ -10967,7 +10967,8 @@
      */
 
     if ((ctxt->sax != NULL) && (ctxt->sax->resolveEntity != NULL))
-	input = ctxt->sax->resolveEntity(ctxt, ExternalID, systemIdCanonic);
+	input = ctxt->sax->resolveEntity(ctxt->userData, ExternalID,
+	                                 systemIdCanonic);
     if (input == NULL) {
         if (sax != NULL) ctxt->sax = NULL;
 	xmlFreeParserCtxt(ctxt);