ソースを参照

cmProc4.c: Changed size validation in _cmScMatchInitMtx() to eliminate crash bug.

master
kevin 11年前
コミット
9fd7c97cc3
1個のファイルの変更2行の追加1行の削除
  1. 2
    1
      cmProc4.c

+ 2
- 1
cmProc4.c ファイルの表示

@@ -1275,7 +1275,8 @@ cmRC_t     cmScMatchFinal( cmScMatch* p )
1275 1275
 
1276 1276
 cmRC_t  _cmScMatchInitMtx( cmScMatch* p, unsigned rn, unsigned cn )
1277 1277
 {
1278
-  if( rn >p->mrn && cn > p->mcn )
1278
+  //if( rn >p->mrn && cn > p->mcn )
1279
+  if( rn*cn > p->mrn*p->mcn )
1279 1280
     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); 
1280 1281
 
1281 1282
   // if the size of the mtx is not changing then there is nothing to do

読み込み中…
キャンセル
保存