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:
2
parser.c
2
parser.c
@ -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;
|
||||
|
Reference in New Issue
Block a user