Blame SOURCES/libxml2-Fix-missing-entities-after-CVE-2014-3660-fix.patch

6dedca
commit 27a93eff49526aacd34192258c19ff5d69d18c00
6dedca
Author: Daniel Veillard <veillard@redhat.com>
6dedca
Date:   Thu Oct 23 11:35:36 2014 +0800
6dedca
6dedca
    Fix missing entities after CVE-2014-3660 fix
6dedca
    
6dedca
    For https://bugzilla.gnome.org/show_bug.cgi?id=738805
6dedca
    
6dedca
    The fix for CVE-2014-3660 introduced a regression in some case
6dedca
    where entity substitution is required and the entity is used
6dedca
    first in anotther entity referenced from an attribute value
6dedca
6dedca
diff --git a/parser.c b/parser.c
6dedca
index b58c2f0..f70d2b5 100644
6dedca
--- a/parser.c
6dedca
+++ b/parser.c
6dedca
@@ -7226,7 +7226,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
6dedca
      * far more secure as the parser will only process data coming from
6dedca
      * the document entity by default.
6dedca
      */
6dedca
-    if ((ent->checked == 0) &&
6dedca
+    if (((ent->checked == 0) ||
6dedca
+         ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
6dedca
         ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
6dedca
          (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
6dedca
 	unsigned long oldnbent = ctxt->nbentities;