From 9fd7c97cc38db5b8d1e6de82dd33fbf0b1119a6b Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 26 May 2013 09:33:13 -0700 Subject: [PATCH] cmProc4.c: Changed size validation in _cmScMatchInitMtx() to eliminate crash bug. --- cmProc4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmProc4.c b/cmProc4.c index 815f3bf..f977ee2 100644 --- a/cmProc4.c +++ b/cmProc4.c @@ -1275,7 +1275,8 @@ cmRC_t cmScMatchFinal( cmScMatch* p ) cmRC_t _cmScMatchInitMtx( cmScMatch* p, unsigned rn, unsigned cn ) { - if( rn >p->mrn && cn > p->mcn ) + //if( rn >p->mrn && cn > p->mcn ) + if( rn*cn > p->mrn*p->mcn ) return cmCtxRtCondition( &p->obj, cmInvalidArgRC, "MIDI sequence length must be less than %i. Score sequence length must be less than %i.",p->mmn,p->msn); // if the size of the mtx is not changing then there is nothing to do