Skip to content
  • Nick Wellnhofer's avatar
    Consolidate recursion checks · 1c8e0e55
    Nick Wellnhofer authored
    Move the check for potentially infinite recursion to
    xsltApplySequenceConstructor. In this function, both template and
    func:function calls can be handled. This also checks for the following
    case of infinite recursion in attribute sets found with afl-fuzz:
    
    <x:attribute-set name="set">
        <x:attribute name="attr">
            <elem x:use-attribute-sets="set"/>
        </x:attribute>
    </x:attribute-set>
    
    Rename funcLevel to depth and check against maxTemplateDepth. I hope it
    isn't a problem to rename an internal struct item.
    1c8e0e55