Re: [xml] [BUG+FIX] valid.c erroneously ignores a validation error if no error callback set

  Ah, right !
Fixed upstream and bug updated,

  thanks !


On Fri, Feb 21, 2014 at 06:20:32PM +0100, Stefan Behnel wrote:

valid.c contains this code:

   2636 if ((ctxt != NULL) && (ctxt->error != NULL)) {
   2637     xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
   2638                     "ID %s already defined\n",
   2639                     value, NULL, NULL);
   2640 }

It prevents the error from being reported if ctxt->error is not set,
although simply calling xmlErrValifNode() would properly report the error
to the global error callback if the NULL checks above didn't exist.

The fix is to remove the surrounding "if" test.

xml mailing list, project page
xml gnome org

Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library

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