summaryrefslogtreecommitdiffstats
path: root/arm-wt-22k
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2011-12-16 08:33:36 -0800
committerMarco Nelissen <marcone@google.com>2011-12-16 08:33:36 -0800
commite6d06460f6936adaf2c5df783700a683fd082878 (patch)
treeade53785131b5ab44646de0c34ba25d3759073b2 /arm-wt-22k
parent5f9600971859fe072f31b38a51c38157f5f9b381 (diff)
downloadexternal_sonivox-e6d06460f6936adaf2c5df783700a683fd082878.zip
external_sonivox-e6d06460f6936adaf2c5df783700a683fd082878.tar.gz
external_sonivox-e6d06460f6936adaf2c5df783700a683fd082878.tar.bz2
Fix crash when scanning corrupt midi file.
b/5453816 Change-Id: Ic2104fc0b86ef0b5ec3af7a009b193f85690d291
Diffstat (limited to 'arm-wt-22k')
-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;