aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-12-06 13:09:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-12-06 13:09:23 +0200
commit3937dc4ce480fe62df020988c4de92696c25e3c3 (patch)
treef9eccc0a0515bdb3347af35697899a7eca94bd78
parent12799de18e38b3cf6cc458bfee07dee7a48df33d (diff)
Import fix for Expat bug
Backport commit d1e0ca1 (Stop leaking opening tag bindings after closing tag mismatch error).
-rw-r--r--libxsde/xsde/c/expat/xmlparse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libxsde/xsde/c/expat/xmlparse.c b/libxsde/xsde/c/expat/xmlparse.c
index 44394c2..f4ddeb6 100644
--- a/libxsde/xsde/c/expat/xmlparse.c
+++ b/libxsde/xsde/c/expat/xmlparse.c
@@ -2493,9 +2493,6 @@ doContent(XML_Parser parser,
int len;
const char *rawName;
TAG *tag = parser->m_tagStack;
- parser->m_tagStack = tag->parent;
- tag->parent = parser->m_freeTagList;
- parser->m_freeTagList = tag;
rawName = s + enc->minBytesPerChar*2;
len = XmlNameLength(enc, rawName);
if (len != tag->rawNameLength
@@ -2503,6 +2500,9 @@ doContent(XML_Parser parser,
*eventPP = rawName;
return XML_ERROR_TAG_MISMATCH;
}
+ parser->m_tagStack = tag->parent;
+ tag->parent = parser->m_freeTagList;
+ parser->m_freeTagList = tag;
--parser->m_tagLevel;
if (parser->m_endElementHandler) {
const XML_Char *localPart;