Hash :
1abf2967
Author :
Date :
2020-08-06T17:51:57
Fix exponential runtime and memory in xi:fallback processing When creating XML_XINCLUDE_START nodes, the children of the original xi:include node must be freed, otherwise fallback content is copied twice, doubling runtime and memory consumption for each nested xi:fallback/xi:include pair. Found with libFuzzer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
<a>
<xi:include href="a01.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:fallback>
<elem/>
<xi:include href="a02.xml">
<xi:fallback>
<elem/>
<xi:include href="a03.xml">
<xi:fallback>
<elem/>
<xi:include href="a04.xml">
<xi:fallback>
<elem/>
<xi:include href="a05.xml">
<xi:fallback>
<elem/>
<xi:include href="a06.xml">
<xi:fallback>
<elem/>
<xi:include href="a07.xml">
<xi:fallback>
<elem/>
<xi:include href="a08.xml">
<xi:fallback>
<elem/>
<xi:include href="a09.xml">
<xi:fallback>
<elem/>
<xi:include href="a10.xml">
<xi:fallback>
<elem/>
<xi:include href="a11.xml">
<xi:fallback>
<elem/>
<xi:include href="a12.xml">
<xi:fallback>
<elem/>
<xi:include href="a13.xml">
<xi:fallback>
<elem/>
<xi:include href="a14.xml">
<xi:fallback>
<elem/>
<xi:include href="a15.xml">
<xi:fallback>
<elem/>
<xi:include href="a16.xml">
<xi:fallback>
<elem/>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</xi:fallback>
</xi:include>
</a>