summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-10-20 00:07:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-20 00:07:17 +0000
commit6117f9294ebfd6efeb1da54ee35c583caaec0c6a (patch)
treec4a463a495bb6d3d6445ce016ab2c61800d454c9
parent5b45b1eb61677ec6ddc86fa1b7e0140167775bd2 (diff)
parent985ee50f8496233f9cadee15b5253df7f3de99ad (diff)
downloadsonivox-android11-mainline-release.tar.gz
Change-Id: Id156795fadb71966a874850349db780038e33929
-rw-r--r--arm-wt-22k/lib_src/eas_mdls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_mdls.c b/arm-wt-22k/lib_src/eas_mdls.c
index 876ce9b..fac6987 100644
--- a/arm-wt-22k/lib_src/eas_mdls.c
+++ b/arm-wt-22k/lib_src/eas_mdls.c
@@ -1372,6 +1372,10 @@ static EAS_RESULT Parse_data (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_
{
return EAS_SUCCESS;
}
+ if (sampleLen < sizeof(EAS_SAMPLE)
+ || (pWsmp->loopStart + pWsmp->loopLength) * sizeof(EAS_SAMPLE) > sampleLen - sizeof(EAS_SAMPLE)) {
+ return EAS_FAILURE;
+ }
pSample[(pWsmp->loopStart + pWsmp->loopLength)>>1] = pSample[(pWsmp->loopStart)>>1];
}