[libxml2] Parser error on repeated recursive entity expansion containing <



commit 7cf57380b11d20b0bd4c86a493db7a0e1d0f0071
Author: Daniel Veillard <veillard redhat com>
Date:   Wed Oct 8 16:09:56 2014 +0800

    Parser error on repeated recursive entity expansion containing &lt;
    
    For https://bugzilla.gnome.org/show_bug.cgi?id=736417
    
    basically a weird side effect and a failure
    to properly parenthesize a boolean expression led to this bug

 parser.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/parser.c b/parser.c
index 2ef2c3b..b9a37ab 100644
--- a/parser.c
+++ b/parser.c
@@ -7684,8 +7684,8 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
     else if ((ctxt->instate == XML_PARSER_ATTRIBUTE_VALUE) &&
             (ent != NULL) && 
             (ent->etype != XML_INTERNAL_PREDEFINED_ENTITY)) {
-       if ((ent->checked & 1) || ((ent->checked == 0) &&
-            (ent->content != NULL) &&(xmlStrchr(ent->content, '<')))) {
+       if (((ent->checked & 1) || (ent->checked == 0)) &&
+            (ent->content != NULL) && (xmlStrchr(ent->content, '<'))) {
            xmlFatalErrMsgStr(ctxt, XML_ERR_LT_IN_ATTRIBUTE,
        "'<' in entity '%s' is not allowed in attributes values\n", name);
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]