Fix potential overflows

Bug: 33402896
Test: played file that triggered overflow
Change-Id: Ibf51bbbd4749377d3e77cf6e53fc66ae33b8ee7c
1 file changed