summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-08-20 23:52:25 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-20 23:52:25 (GMT)
commit8413fe737c22e380a68525bf12ac96ecabfd1d9d (patch)
treebf1dd0e0179a32bb2a7b280bdecb4d4e83498d63
parent28a682e427b1ca365e1aec23321ed229cefeeb92 (diff)
parent99e0e2e2c1fd0f895b6d4bdf0a85798cf044218e (diff)
downloadandroid_external_sonivox-8413fe737c22e380a68525bf12ac96ecabfd1d9d.zip
android_external_sonivox-8413fe737c22e380a68525bf12ac96ecabfd1d9d.tar.gz
android_external_sonivox-8413fe737c22e380a68525bf12ac96ecabfd1d9d.tar.bz2
Merge "Sonivox: make sure waveIndex is valid in Parse_rgn() in eas_mdls.c." into mnc-dev
-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 51cce70..d66c734 100644
--- a/arm-wt-22k/lib_src/eas_mdls.c
+++ b/arm-wt-22k/lib_src/eas_mdls.c
@@ -1676,6 +1676,10 @@ static EAS_RESULT Parse_rgn (SDLS_SYNTHESIZER_DATA *pDLSData, EAS_I32 pos, EAS_I
/* parse wlnk chunk */
if ((result = Parse_wlnk(pDLSData, wlnkPos, &waveIndex)) != EAS_SUCCESS)
return result;
+ if (waveIndex >= pDLSData->waveCount)
+ {
+ return EAS_FAILURE;
+ }
pWsmp = &pDLSData->wsmpData[waveIndex];
/* if there is any articulation data, parse it */