summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2011-12-16 16:33:36 (GMT)
committerMarco Nelissen <marcone@google.com>2011-12-16 16:33:36 (GMT)
commite6d06460f6936adaf2c5df783700a683fd082878 (patch)
treeade53785131b5ab44646de0c34ba25d3759073b2
parent5f9600971859fe072f31b38a51c38157f5f9b381 (diff)
downloadandroid_external_sonivox-jellybean.zip
android_external_sonivox-jellybean.tar.gz
android_external_sonivox-jellybean.tar.bz2
Fix crash when scanning corrupt midi file.jellybean-stablejellybean
b/5453816 Change-Id: Ic2104fc0b86ef0b5ec3af7a009b193f85690d291
-rw-r--r--arm-wt-22k/lib_src/eas_smf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arm-wt-22k/lib_src/eas_smf.c b/arm-wt-22k/lib_src/eas_smf.c
index 9e096b6..7b0bdd8 100644
--- a/arm-wt-22k/lib_src/eas_smf.c
+++ b/arm-wt-22k/lib_src/eas_smf.c
@@ -281,6 +281,11 @@ EAS_RESULT SMF_Event (S_EAS_DATA *pEASData, EAS_VOID_PTR pInstData, EAS_INT pars
if (pSMFData->state >= EAS_STATE_OPEN)
return EAS_SUCCESS;
+ if (!pSMFData->nextStream) {
+ return EAS_ERROR_FILE_FORMAT;
+ }
+
+
/* get current ticks */
ticks = pSMFData->nextStream->ticks;