diff options
author | Moonchild <moonchild@palemoon.org> | 2022-09-28 13:49:41 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-09-28 13:49:41 +0000 |
commit | b83dd4e5e8b95f61fa2c25b1635793f919e4f101 (patch) | |
tree | 292ca5aa77bd0864a21fc14019f8012d5db0266d /parser | |
parent | 95907ddf88c78b8431d50606714f48304c7c8a16 (diff) | |
download | uxp-b83dd4e5e8b95f61fa2c25b1635793f919e4f101.tar.gz |
Issue #2010 - Ensure raw tagnames are safe exiting internalEntityParser
This resolves #2010
Diffstat (limited to 'parser')
-rw-r--r-- | parser/expat/lib/xmlparse.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c index 6ab140c894..34888aba9e 100644 --- a/parser/expat/lib/xmlparse.c +++ b/parser/expat/lib/xmlparse.c @@ -4999,8 +4999,18 @@ internalEntityProcessor(XML_Parser parser, { processor = contentProcessor; /* see externalEntityContentProcessor vs contentProcessor */ - return doContent(parser, parentParser ? 1 : 0, encoding, s, end, - nextPtr, (XML_Bool)!ps_finalBuffer); + result = doContent(parser, + parentParser ? 1 : 0, + encoding, + s, + end, + nextPtr, + (XML_Bool)!ps_finalBuffer); + if (result == XML_ERROR_NONE) { + if (!storeRawNames(parser)) + return XML_ERROR_NO_MEMORY; + } + return result; } } |