summaryrefslogtreecommitdiffstats
path: root/arm-wt-22k
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-08-20 16:25:04 -0700
committerThe Android Automerger <android-build@android.com>2015-09-01 13:58:18 -0700
commitbca9c895f4aaab4d84cf3b8f96a7d23e2b77b08f (patch)
tree4e6575cdad73c9b799f2c2feaaeb0418729346e5 /arm-wt-22k
parent0c3f41e87fba16c56a53be372b165d18ab57e0fd (diff)
downloadandroid_external_sonivox-bca9c895f4aaab4d84cf3b8f96a7d23e2b77b08f.zip
android_external_sonivox-bca9c895f4aaab4d84cf3b8f96a7d23e2b77b08f.tar.gz
android_external_sonivox-bca9c895f4aaab4d84cf3b8f96a7d23e2b77b08f.tar.bz2
Sonivox: make sure waveIndex is valid in Parse_rgn() in eas_mdls.c.
Bug: 23335715 Change-Id: I4a5522c46dcda9285db1f830337aa2642ddc4fd1 (cherry picked from commit 99e0e2e2c1fd0f895b6d4bdf0a85798cf044218e)
Diffstat (limited to 'arm-wt-22k')
-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 */