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.
Bug: 126380818
Change-Id: Ibda6146d3abade392ec3fe1a9d704ade7567e636
(cherry picked from commit 7ffa21a8623fd973598e9905f401e9e1f8cba6c2)
Merged-In: Ibda6146d3abade392ec3fe1a9d704ade7567e636
1 file changed