Fix unbounded recursion in MPEG4Source::parseChunk

MPEG4Source::parseChunk processed nested boxes (like moof->traf->moof)
recursively but did not track recursion depth. An attacker could craft
an MP4 file containing excessively nested boxes, leading to stack
exhaustion and a crash in mediaserver.

This change implements a recursion depth guard in MPEG4Source::parseChunk
similar to the one already present in MPEG4Extractor::parseChunk.

Bug: 503554506
Test: m libmp4extractor
Flag: EXEMPT CVE_FIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:4a06c37022b130d3b9a45ea4781e6e142105c0b9
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:66ab86ca1310fb15c4a715c9bb9306dc5b1a82ff
Merged-In: I4f856dcf88ba7a097382995e4e7fa8fe8a3dbebd
Change-Id: I4f856dcf88ba7a097382995e4e7fa8fe8a3dbebd
1 file changed