Check MAX_CHANNELS in sndfile-deinterleave
Allocated buffer has space for only 16 channels. Verify that input file meets this limit. Fixes #397 Gbp-Pq: Name Check-MAX_CHANNELS-in-sndfile-deinterleave.patch
This commit is contained in:
parent
2f9f04989a
commit
8394f75ae0
|
@ -89,6 +89,13 @@ main (int argc, char **argv)
|
|||
exit (1) ;
|
||||
} ;
|
||||
|
||||
if (sfinfo.channels > MAX_CHANNELS)
|
||||
{ printf ("\nError : Input file '%s' has too many (%d) channels. Limit is %d.\n",
|
||||
argv [1], sfinfo.channels, MAX_CHANNELS) ;
|
||||
exit (1) ;
|
||||
} ;
|
||||
|
||||
|
||||
state.channels = sfinfo.channels ;
|
||||
sfinfo.channels = 1 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue