summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-08-21 00:57:10 (GMT)
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-21 00:57:10 (GMT)
commit892c138acd55a3080cf2c9cdd2b9aa8c51e58e54 (patch)
treebfeb14aa5dcb6c89b348b5ec8c2b8dfec6faae5a
parent0a3e23a696b985a02d8f896f12a989e72c9b1cfe (diff)
parented1104cffb20d4b88a73c4fc348dcbdb8b48a105 (diff)
downloadandroid_external_sonivox-892c138acd55a3080cf2c9cdd2b9aa8c51e58e54.zip
android_external_sonivox-892c138acd55a3080cf2c9cdd2b9aa8c51e58e54.tar.gz
android_external_sonivox-892c138acd55a3080cf2c9cdd2b9aa8c51e58e54.tar.bz2
am ed1104cf: am 8cbef48b: Sonivox: make sure waveIndex is valid in Parse_rgn() in eas_mdls.c.
* commit 'ed1104cffb20d4b88a73c4fc348dcbdb8b48a105': Sonivox: make sure waveIndex is valid in Parse_rgn() in eas_mdls.c.
-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 */