diff --git a/ChangeLog b/ChangeLog index c57f718c..fc9b504a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 20 14:02:00 CEST 2002 Daniel Veillard + + * parser.c: fixing bug #87900 + May 24 13:10:22 CEST 2002 Daniel Veillard * libxml.spec.in: fixing bug #81112 diff --git a/parser.c b/parser.c index 83094f5c..363e3d70 100644 --- a/parser.c +++ b/parser.c @@ -10985,10 +10985,14 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, char *buffer, int size) { int ret = 0; xmlParserCtxtPtr ctxt; + xmlSAXHandlerPtr oldsax; ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return -1; - ctxt->sax = sax; + if (sax != NULL) { + oldsax = ctxt->sax; + ctxt->sax = sax; + } ctxt->userData = user_data; xmlParseDocument(ctxt); @@ -11002,7 +11006,7 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, ret = -1; } if (sax != NULL) - ctxt->sax = NULL; + ctxt->sax = oldsax; xmlFreeParserCtxt(ctxt); return ret;