GNOME Bugzilla – Bug 73088
wrong error function context
Last modified: 2009-08-15 18:40:50 UTC
In our code we found situation when generic error function we provide to libxslt was called with wrong contect. Quick investigation showed that wrong context pointer was passed. Bug appears in version 1.0.7 and cvs snapshot dated 02/28/2002 09:47:00 AM. This bug is pretty severe, since context is passed as void* pointer and when casted to wrong type will most probably cause application crash when accessed. Here is diff file (towards said CVS snapshot) correcting this problem: diff -u -rp XSLT.orig/libxslt/preproc.c XSLT/libxslt/preproc.c --- XSLT.orig/libxslt/preproc.c Thu Oct 18 00:45:09 2001 +++ XSLT/libxslt/preproc.c Thu Feb 28 22:31:04 2002 @@ -1326,7 +1326,7 @@ xsltStylePreCompute(xsltStylesheetPtr st (xsltTransformFunction) xsltDocumentElem); } else { xsltPrintErrorContext(NULL, style, inst); - xsltGenericError(xsltGenericDebugContext, + xsltGenericError(xsltGenericErrorContext, "xsltStylePreCompute: unknown xsl:%s\n", inst->name); style->warnings++; }
Right, good catch, fixed in CVS, http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=03%2F01%2F02+04%3A17&maxdate=03%2F01%2F02+04%3A19&cvsroot=%2Fcvs%2Fgnome thanks a lot ! Daniel
This should be fixed in the recent releases, thanks ! Daniel