summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-10-06 16:14:02 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-10-06 16:14:02 +0000
commit291ac995c4d359bc60d44da01758ef3ea9ab913d (patch)
treec4a463a495bb6d3d6445ce016ab2c61800d454c9
parentfc01454eb6c9bdb7707c65aca4b3ede9f357ba03 (diff)
parentb67202e2673ce68051635a3d91217364a4841a1d (diff)
downloadsonivox-android11-qpr2-release.tar.gz
Change-Id: I6c3d41c3d38cc62d671f8b57808effbe328fd9d9
-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];
}