diff options
author | Marco Nelissen <marcone@google.com> | 2019-04-08 15:30:22 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2019-04-17 17:01:32 +0000 |
commit | 52f0f7a0826ce93cd55382334533cbe69140920d (patch) | |
tree | e457593443c348b73e8021ca1183aedfacdf32c9 | |
parent | fdb1abaf25309939f09fef5dc4b039ee10c04c2d (diff) | |
download | sonivox-52f0f7a0826ce93cd55382334533cbe69140920d.tar.gz |
Fix OOB access
Bug: 129940870
Test: CTS, manual
Change-Id: I2f478abb9e895155cf7f8da3266aad8179e32454
-rw-r--r-- | arm-wt-22k/lib_src/eas_wtsynth.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_wtsynth.c b/arm-wt-22k/lib_src/eas_wtsynth.c index ecb6837..987170b 100644 --- a/arm-wt-22k/lib_src/eas_wtsynth.c +++ b/arm-wt-22k/lib_src/eas_wtsynth.c @@ -576,6 +576,9 @@ static EAS_BOOL WT_UpdateVoice (S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH temp += (pVoice->note + pSynth->globalTranspose) * 100; intFrame.frame.phaseIncrement = WT_UpdatePhaseInc(pWTVoice, pArt, pChannel, temp); temp = pWTVoice->loopEnd - pWTVoice->loopStart; +#ifdef _16_BIT_SAMPLES + temp >>= 1; +#endif if (temp != 0) { temp = temp << NUM_PHASE_FRAC_BITS; if (intFrame.frame.phaseIncrement > temp) { |