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



  Ah, right !
Fixed upstream and bug updated,

  thanks !

Daniel

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

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.

https://bugzilla.gnome.org/show_bug.cgi?id=724903

Stefan
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
https://mail.gnome.org/mailman/listinfo/xml

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


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