summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-08-19 15:08:13 -0700
committerBrint E. Kriebel <bekit@cyngn.com>2015-10-05 15:11:45 -0700
commit810bf9a5b185bd5c3938a00a7467acc1fa9bdd43 (patch)
tree6513103406fbf243e55be54152a7b20e7ce268ef
parenta895b477793fbf352a77e5532a8d6ea831539087 (diff)
downloadandroid_external_sonivox-810bf9a5b185bd5c3938a00a7467acc1fa9bdd43.zip
android_external_sonivox-810bf9a5b185bd5c3938a00a7467acc1fa9bdd43.tar.gz
android_external_sonivox-810bf9a5b185bd5c3938a00a7467acc1fa9bdd43.tar.bz2
Check segments and libs
Bug: 23286323 Change-Id: I95ee385d0fb1503a4ce5a96e30d034ac8b81170e Ticket: CYNGNOS-985
-rw-r--r--arm-wt-22k/lib_src/jet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/jet.c b/arm-wt-22k/lib_src/jet.c
index 97672cf..2f1541f 100644
--- a/arm-wt-22k/lib_src/jet.c
+++ b/arm-wt-22k/lib_src/jet.c
@@ -282,10 +282,16 @@ static EAS_RESULT JetParseInfoChunk (EAS_DATA_HANDLE easHandle, EAS_I32 pos, EAS
switch (infoType)
{
case INFO_NUM_SMF_CHUNKS:
+ if (temp >= JET_MAX_SEGMENTS) {
+ return EAS_ERROR_INCOMPATIBLE_VERSION;
+ }
easHandle->jetHandle->numSegments = (EAS_U8) temp;
break;
case INFO_NUM_DLS_CHUNKS:
+ if (temp >= JET_MAX_DLS_COLLECTIONS) {
+ return EAS_ERROR_INCOMPATIBLE_VERSION;
+ }
easHandle->jetHandle->numLibraries = (EAS_U8) temp;
break;