xmllint {2-2.6.31,2-2.7.6} segfault on LFS-SVN.

xinglp xinglp at gmail.com
Thu May 6 06:00:49 PDT 2010


I met it when I build LFS html book.

It can be fixed it with
./configure \
--prefix=/usr \
--without-zlib

xmlIO.c:2396  2-2.6.31
xmlIO.c:2510  2-2.7.6
    /*
     * Allocate the Input buffer front-end.
     */
    ret = xmlAllocParserInputBuffer(enc);
    if (ret != NULL) {
ret->context = context;
ret->readcallback = xmlInputCallbackTable[i].readcallback;
ret->closecallback = xmlInputCallbackTable[i].closecallback;
#ifdef HAVE_ZLIB_H
if ((xmlInputCallbackTable[i].opencallback == xmlGzfileOpen) &&
(strcmp(URI, "-") != 0)) {   // <<<<<<<<<<=========== segfault here
    if (((z_stream *)context)->avail_in > 4) {
        char *cptr, buff4[4];
cptr = (char *) ((z_stream *)context)->next_in;
if (gzread(context, buff4, 4) == 4) {
    if (strncmp(buff4, cptr, 4) == 0)
        ret->compressed = 0;
    else
        ret->compressed = 1;
    gzrewind(context);
}
    }
}
#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20100506/1f3c4678/attachment.html>


More information about the lfs-support mailing list