sonivox: prevent infinite loop in OTA ringtones

This detects and blocks infinite loops in corrupt files.

Bug: 68664359
Bug: 110435401

Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.StagefrightTest#testStagefright_bug_68664359
Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.StagefrightTest#testStagefright_bug_110435401

Change-Id: I67652fbcc8b0812a838ae6551d0be2770a655c95
Merged-In: I67652fbcc8b0812a838ae6551d0be2770a655c95
(cherry picked from commit 3cc5df82112cbb5b75349f0f2b733dcba3660a2f)
3 files changed