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

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