On Tue, Sep 02, 2008 at 10:02:20AM +0200, Daniel Veillard wrote:
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 ?
Can you try the enclosed patch on your example ? Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
Attachment:
reader_err_format.patch
Description: Text document