diff options
author | David Kilzer <ddkilzer@apple.com> | 2017-06-16 21:30:42 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-06-16 21:30:42 +0200 |
commit | 3f0627a1ee854dc965bf61dd6466a798b80cf088 (patch) | |
tree | b83fc678c4373fad6afc951d17a1c12342368e25 /parser.c | |
parent | 01a4b81a036228d7c692f29e5f306ff0d510597f (diff) | |
download | libxml2-3f0627a1ee854dc965bf61dd6466a798b80cf088.tar.gz |
Fix duplicate SAX callbacks for entity content
Reset 'was_checked' to prevent entity from being parsed twice and SAX
callbacks being invoked twice if XML_PARSE_NOENT was set.
This regressed in version 2.9.3 and caused problems with WebKit.
Fixes bug 760367.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7418,6 +7418,9 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { } if (ent->checked == 0) ent->checked = 2; + + /* Prevent entity from being parsed and expanded twice (Bug 760367). */ + was_checked = 0; } else if (ent->checked != 1) { ctxt->nbentities += ent->checked / 2; } |