Enforce limits of XMF node
Previously, there was no enforcement of reading past the end of a
node, which can lead to various kinds of corner cases when handling
corrupt XMF, for example, nodes could report having a size of 0 and
then a huge number of nodes can cause the parser to spin.
This change add some enforcement for offsets and lengths specified in
the file to prevent such problems.
(cherry picked from commit 7ffa21a8623fd973598e9905f401e9e1f8cba6c2)
1 file changed