Commit 0b348def authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixing bug #87900 Daniel

* parser.c: fixing bug #87900
Daniel
parent 32260e27
Tue Aug 20 14:02:00 CEST 2002 Daniel Veillard <daniel@veillard.com>
* parser.c: fixing bug #87900
May 24 13:10:22 CEST 2002 Daniel Veillard <daniel@veillard.com>
* libxml.spec.in: fixing bug #81112
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment