diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-06 17:47:37 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-05-06 17:47:37 +0200 |
commit | d0c3f01e110d54415611c5fa0040cdf4a56053f9 (patch) | |
tree | c4f9ac68bae83d2a2efc990b94ae8ae8e0b38de0 | |
parent | 06a2c251a18d8cc93bcae82270997b27cbc9aaea (diff) | |
download | libxml2-d0c3f01e110d54415611c5fa0040cdf4a56053f9.tar.gz |
parser: Fix old SAX1 parser with custom callbacks
For some reason, xmlCtxtUseOptionsInternal set the start and end element
SAX handlers to the internal DOM builder functions when XML_PARSE_SAX1
was specified. This means that custom SAX handlers could never work with
that flag because these functions would receive the wrong user data
argument and crash immediately.
Fixes #535.
-rw-r--r-- | parser.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -14479,8 +14479,6 @@ xmlCtxtUseOptionsInternal(xmlParserCtxtPtr ctxt, int options, const char *encodi } #ifdef LIBXML_SAX1_ENABLED if (options & XML_PARSE_SAX1) { - ctxt->sax->startElement = xmlSAX2StartElement; - ctxt->sax->endElement = xmlSAX2EndElement; ctxt->sax->startElementNs = NULL; ctxt->sax->endElementNs = NULL; ctxt->sax->initialized = 1; |