49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
|
|
From 741b0d0a8b9bbee67d68af022cb3137c74e9cd0f Mon Sep 17 00:00:00 2001
|
||
|
|
From: Nick Wellnhofer <wellnhofer@aevum.de>
|
||
|
|
Date: Tue, 7 Jul 2020 12:54:34 +0200
|
||
|
|
Subject: [PATCH] Fix regression introduced with 477c7f6a
|
||
|
|
|
||
|
|
The 'inSubset' member is actually used by the SAX2 handlers. Store
|
||
|
|
extra parser state in 'hasPErefs'.
|
||
|
|
---
|
||
|
|
HTMLparser.c | 14 +++++++-------
|
||
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/HTMLparser.c b/HTMLparser.c
|
||
|
|
index 468db107..366c19b3 100644
|
||
|
|
--- a/HTMLparser.c
|
||
|
|
+++ b/HTMLparser.c
|
||
|
|
@@ -5160,9 +5160,9 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
|
||
|
|
|
||
|
|
if (ctxt->checkIndex > base) {
|
||
|
|
base = ctxt->checkIndex;
|
||
|
|
- /* Abuse inSubset member to restore current state. */
|
||
|
|
- incomment = ctxt->inSubset & 1 ? 1 : 0;
|
||
|
|
- invalue = ctxt->inSubset & 2 ? 1 : 0;
|
||
|
|
+ /* Abuse hasPErefs member to restore current state. */
|
||
|
|
+ incomment = ctxt->hasPErefs & 1 ? 1 : 0;
|
||
|
|
+ invalue = ctxt->hasPErefs & 2 ? 1 : 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (in->buf == NULL) {
|
||
|
|
@@ -5240,12 +5240,12 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
ctxt->checkIndex = base;
|
||
|
|
- /* Abuse inSubset member to track current state. */
|
||
|
|
- ctxt->inSubset = 0;
|
||
|
|
+ /* Abuse hasPErefs member to track current state. */
|
||
|
|
+ ctxt->hasPErefs = 0;
|
||
|
|
if (incomment)
|
||
|
|
- ctxt->inSubset |= 1;
|
||
|
|
+ ctxt->hasPErefs |= 1;
|
||
|
|
if (invalue)
|
||
|
|
- ctxt->inSubset |= 2;
|
||
|
|
+ ctxt->hasPErefs |= 2;
|
||
|
|
#ifdef DEBUG_PUSH
|
||
|
|
if (next == 0)
|
||
|
|
xmlGenericError(xmlGenericErrorContext,
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|