[libxml2] erroneously ignores a validation error if no error callback set



commit a16eb968075a82ec33b2c1e77db8909a35b44620
Author: Daniel Veillard <veillard redhat com>
Date:   Tue Jun 10 16:06:14 2014 +0800

    erroneously ignores a validation error if no error callback set
    
    Reported by Stefan Behnel
    https://bugzilla.gnome.org/show_bug.cgi?id=724903

 valid.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/valid.c b/valid.c
index aedd9d7..1e03a7c 100644
--- a/valid.c
+++ b/valid.c
@@ -2633,11 +2633,8 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
        /*
         * The id is already defined in this DTD.
         */
-       if ((ctxt != NULL) && (ctxt->error != NULL)) {
-           xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
-                           "ID %s already defined\n",
-                           value, NULL, NULL);
-       }
+       xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
+                       "ID %s already defined\n", value, NULL, NULL);
 #endif /* LIBXML_VALID_ENABLED */
        xmlFreeID(ret);
        return(NULL);


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