• Nick Wellnhofer's avatar
    Always set context node before calling XPath iterators · 08b62c25
    Nick Wellnhofer authored
    The xmlXPathNext* iterators rely on the XPath context node being set to
    the start node of the iteration. Some parts of the code base like the
    xsl:key functions also leave the context node in an unspecified state.
    Make sure that the context node is reset before invoking the XPath
    iterators. Also backup and restore the context node in
    xsltNumberFormatGetMultipleLevel for good measure.
    This bug could also lead to type confusion and invalid reads in
    connection with namespace nodes.
    Fixes #13. Also see the Chromium bug report:
    Thanks to Nicolas Grégoire for the report.
bug-218.xml 23 Bytes