summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-05-09 17:53:12 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-05-09 17:53:12 +0000
commit99c0a8de7e339b8510bda16949fe51d00ad25672 (patch)
tree934708fc81d80c34b1f802d1e648391bf0d2fc34
parent04b9357b41ae460555500ce2cd17a86f0cfb3bfe (diff)
parent91ad09f79a0d7f476c39f00f06c5c1eeed44f55e (diff)
downloadsonivox-99c0a8de7e339b8510bda16949fe51d00ad25672.tar.gz
Merge "sonivox: Fix integer overflows in WT_CheckSampleEnd" am: c883cb16fb am: 9d97740999 am: 23c7ad2ac3 am: 91ad09f79a
Original change: https://android-review.googlesource.com/c/platform/external/sonivox/+/1669826 Change-Id: I95069cc68b741472c1d9fcc7401683c534b38e0e
-rw-r--r--arm-wt-22k/lib_src/eas_wtsynth.c2
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 {