Explorar el Código

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

master
kevin hace 11 años
padre
commit
9fd7c97cc3
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      cmProc4.c

+ 2
- 1
cmProc4.c Ver fichero

1275
 
1275
 
1276
 cmRC_t  _cmScMatchInitMtx( cmScMatch* p, unsigned rn, unsigned cn )
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
     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
     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
   // if the size of the mtx is not changing then there is nothing to do
1282
   // if the size of the mtx is not changing then there is nothing to do

Loading…
Cancelar
Guardar