On Tue, Sep 02, 2008 at 04:50:29AM +0200, DspLabs Srl wrote:
> Hello,
>
> the attached patch fixes xmllib2-2.6.32 for a segfault issue occurring
> on Linux x86_64 systems during validation when an external error handler
> is set with xmlTextReaderSetErrorHandler function.
> The problem is located in file xmlreader.c, function
> xmlTextReaderBuildMessage and is due to wrong usage of  variable
> arguments functions, clearly an invalid code (ISO C99, 7.15)

  Hum, I see what you mean, but instead I think just adding
va_start(ap, msg); and va_end(ap); around the snprintf and limiting the
loop to a maximum size limit is probably a better solution as it
does exactly as the XML_GET_VAR_STR() macro does in error.c
  And that code got a lot of testing, so i would rather reuse
the same rather than a va-list copy,

  what do you think ?

   in any case thanks for raising the issue !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
[EMAIL PROTECTED]  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to