diff options
author | Brian C. Young <bcyoung@google.com> | 2017-04-05 09:47:34 -0700 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2017-04-19 10:59:10 -0700 |
commit | cb2045077daff67156d1598b87956f8052d7bef2 (patch) | |
tree | 9ee6e4521bc314b383519de537439cd53431df82 | |
parent | 730d8d32485a1881d6c0e6b0fd7ab88488e4350a (diff) | |
download | platform_external_libxml2-cb2045077daff67156d1598b87956f8052d7bef2.tar.gz platform_external_libxml2-cb2045077daff67156d1598b87956f8052d7bef2.tar.bz2 platform_external_libxml2-cb2045077daff67156d1598b87956f8052d7bef2.zip |
DO NOT MERGE: Add validation for eternal enities
https://bugzilla.gnome.org/show_bug.cgi?id=780691
Bug: 36556310
Change-Id: I9450743e167c3c73af5e4071f3fc85e81d061648
(cherry picked from commit bef9af3d89d241bcb518c20cba6da2a2fd9ba049)
-rw-r--r-- | parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -8130,6 +8130,14 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt) if (xmlPushInput(ctxt, input) < 0) return; } else { + if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) && + ((ctxt->options & XML_PARSE_NOENT) == 0) && + ((ctxt->options & XML_PARSE_DTDVALID) == 0) && + ((ctxt->options & XML_PARSE_DTDLOAD) == 0) && + ((ctxt->options & XML_PARSE_DTDATTR) == 0) && + (ctxt->replaceEntities == 0) && + (ctxt->validate == 0)) + return; /* * TODO !!! * handle the extra spaces added before and after |