diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-05-09 15:40:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-09 15:40:58 +0000 |
commit | 9d97740999ebe8df971811437910318016eb1c16 (patch) | |
tree | 934708fc81d80c34b1f802d1e648391bf0d2fc34 | |
parent | 4af13a244fff108decb14ae88e65046809f52800 (diff) | |
parent | c883cb16fb6a0a79581c9a8f4fed4968bc074556 (diff) | |
download | sonivox-9d97740999ebe8df971811437910318016eb1c16.tar.gz |
Merge "sonivox: Fix integer overflows in WT_CheckSampleEnd" am: c883cb16fb
Original change: https://android-review.googlesource.com/c/platform/external/sonivox/+/1669826
Change-Id: I93400d3c917d10db4afab9276b7ca192a94cf9de
-rw-r--r-- | arm-wt-22k/lib_src/eas_wtsynth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arm-wt-22k/lib_src/eas_wtsynth.c b/arm-wt-22k/lib_src/eas_wtsynth.c index d3ca3af..74f78f5 100644 --- a/arm-wt-22k/lib_src/eas_wtsynth.c +++ b/arm-wt-22k/lib_src/eas_wtsynth.c @@ -482,7 +482,7 @@ EAS_BOOL WT_CheckSampleEnd (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame, E #endif /* now account for the fractional portion */ /*lint -e{703} use shift for performance */ - numSamples = (EAS_I32) ((numSamples << NUM_PHASE_FRAC_BITS) - pWTVoice->phaseFrac); + numSamples = (numSamples << NUM_PHASE_FRAC_BITS) - (EAS_I32) pWTVoice->phaseFrac; if (pWTIntFrame->frame.phaseIncrement) { pWTIntFrame->numSamples = 1 + (numSamples / pWTIntFrame->frame.phaseIncrement); } else { |