[xslt] bug while reporting errors in libxslt



Hi!

In my code I found that sometimes GenericErrorFunc is called with bad
pointer, attempt to print which causes core dump.

This problem is easily reporoduced with 'xsltproc' command:

zembla /home/lord/tmp/fwb/share/fwbuilder/migration/0.8.7> xsltproc
FWBuilderPreferences.xslt ~/.fwbuilder.xml
FWBuilderPreferences.xslt:1: error: Start tag expected, '<' not found
***<!--
Segmentation fault (core dumped)
zembla /home/lord/tmp/fwb/share/fwbuilder/migration/0.8.7>

Please find attached 2 files (XML and XSLT which I've used to
reproduce it).

I am using RedHat7. Here is package info:

zembla /home/lord/tmp/fwb/share/fwbuilder/migration/0.8.7> rpm -qa| grep
xslt
libxslt-0.7.0-1
libxslt-devel-0.7.0-1
zembla /home/lord/tmp/fwb/share/fwbuilder/migration/0.8.7>

Sincerely,
Vadim

-- 
;;----------------------------------+-----------------------------------+
;; Vadim Zaliva                     + Those who do not understand Unix  +
;; mailto:lord crocodile org        + are condemned to reinvent it,     +
;; http://www.crocodile.org         + poorly.          (H. Spencer)     +
;;----------------------------------+-----------------------------------+
***<!--
   Filename: translate087preferences.xsl
   Author: Friedhelm Duesterhoeft
   Build date: 04/16/2001
   Last changed: 04/16/2001
   Version: 1.4.1
   Description: translates old style fwbuilder user preferences according to new DTD (1.40)
   Caveates: none known
-->
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>

<xsl:output method="xml" version="1.0" doctype-system="fwbuilder_preferences.dtd" indent="yes" encoding="utf-8"/>

<xsl:template name="Print">
   <Print>
      <Command>lpr</Command>
      <Filter>null.xsl</Filter>
      <ToFile>false</ToFile>
   </Print>
</xsl:template>

<xsl:template match="Paths">
   <Paths>
   <xsl:choose>
      <xsl:when test="Wdir">
         <xsl:copy-of select="Wdir"/>
      </xsl:when>
      <xsl:otherwise>
         <Wdir/>
      </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
      <xsl:when test="SNMPget">
        <xsl:copy-of select="SNMPget"/>
      </xsl:when>
      <xsl:otherwise>
        <SNMPget>/usr/bin/snmpget</SNMPget>
      </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
      <xsl:when test="SNMPwalk">
        <xsl:copy-of select="SNMPwalk"/>
      </xsl:when>
      <xsl:otherwise>
        <SNMPwalk>/usr/bin/snmpwalk</SNMPwalk>
      </xsl:otherwise>
   </xsl:choose>
   </Paths>
</xsl:template>

<xsl:template match="UI">
   <UI>
   <xsl:choose>
      <xsl:when test="ShowIconsInPolicy='1'"> 
        <ShowIconsInPolicy>true</ShowIconsInPolicy>
      </xsl:when>
      <xsl:when test="ShowIconsInPolicy='0'"> 
        <ShowIconsInPolicy>false</ShowIconsInPolicy>
      </xsl:when>
      <xsl:otherwise>
        <ShowIconsInPolicy>true</ShowIconsInPolicy>
      </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
      <xsl:when test="LargeIconsInGroups='1'"> 
        <LargeIconsInGroups>true</LargeIconsInGroups>
      </xsl:when>
      <xsl:when test="LargeIconsInGroups='0'"> 
        <LargeIconsInGroups>false</LargeIconsInGroups>
      </xsl:when>
      <xsl:otherwise>
        <LargeIconsInGroups>true</LargeIconsInGroups>
      </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
      <xsl:when test="ShowHidden='1'"> 
        <ShowHidden>true</ShowHidden>
      </xsl:when>
      <xsl:when test="ShowHidden='0'"> 
        <ShowHidden>false</ShowHidden>
      </xsl:when>
      <xsl:otherwise>
        <ShowHidden>true</ShowHidden>
      </xsl:otherwise>
   </xsl:choose>
   <ObjectQuickView>popup</ObjectQuickView>
   <ObjectQuickViewTimeout>2</ObjectQuickViewTimeout>
   </UI>
</xsl:template>

<xsl:template match="/FWBuilderPreferences">
   <FWBuilderPreferences version="0.9.0">
       <xsl:call-template name="Print"/>
       <xsl:apply-templates select="Paths"/>
       <xsl:apply-templates select="UI"/>
   </FWBuilderPreferences>
</xsl:template>

</xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE FWBuilderPreferences SYSTEM "fwbuilder_preferences.dtd">
<FWBuilderPreferences version="0.8.7">
<Print>
<Command>lpr</Command>
<Filter>null.xsl</Filter>
<ToFile>false</ToFile>
</Print>
<Paths>
<Wdir/>
<SNMPget>/usr/bin/snmpget</SNMPget>
<SNMPwalk>/usr/bin/snmpwalk</SNMPwalk>
</Paths>
<UI>
<ShowIconsInPolicy>true</ShowIconsInPolicy>
<LargeIconsInGroups>true</LargeIconsInGroups>
<ShowHidden>true</ShowHidden>
<ObjectQuickView>popup</ObjectQuickView>
<ObjectQuickViewTimeout>2</ObjectQuickViewTimeout>
</UI>
</FWBuilderPreferences>


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