commit | e6d06460f6936adaf2c5df783700a683fd082878 | [log] [tgz] |
---|---|---|
author | Marco Nelissen <marcone@google.com> | Fri Dec 16 08:33:36 2011 -0800 |
committer | Marco Nelissen <marcone@google.com> | Fri Dec 16 08:33:36 2011 -0800 |
tree | ade53785131b5ab44646de0c34ba25d3759073b2 | |
parent | 5f9600971859fe072f31b38a51c38157f5f9b381 [diff] |
Fix crash when scanning corrupt midi file. b/5453816 Change-Id: Ic2104fc0b86ef0b5ec3af7a009b193f85690d291
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 @@ if (pSMFData->state >= EAS_STATE_OPEN) return EAS_SUCCESS; + if (!pSMFData->nextStream) { + return EAS_ERROR_FILE_FORMAT; + } + + /* get current ticks */ ticks = pSMFData->nextStream->ticks;