1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

try to cope with the fact that apps may still have allocated smaller SAX

* parser.c: try to cope with the fact that apps may still
  have allocated smaller SAX callbak block
Daniel
This commit is contained in:
Daniel Veillard
2003-09-07 20:54:29 +00:00
parent 0fb1893539
commit bbeb9f9e26
3 changed files with 197 additions and 192 deletions

View File

@ -8574,7 +8574,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
/*
* SAX: detecting the level.
*/
if ((ctxt->sax) &&
if ((ctxt->sax) && (ctxt->sax->initialized == XML_SAX2_MAGIC) &&
((ctxt->sax->startElementNs != NULL) ||
(ctxt->sax->endElementNs != NULL) ||
(ctxt->sax->attributeNs != NULL))) ctxt->sax2 = 1;