Fix buffer overflow when processing >16 channels

Signed-off-by: Olli <oparviai@iki.fi>
This commit is contained in:
Olli
2026-03-29 13:09:00 +03:00
parent 73544797a6
commit bb497995ec
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ void WavInFile::init()
}
// sanity check for format parameters
if ((header.format.channel_number < 1) || (header.format.channel_number > 9) ||
if ((header.format.channel_number < 1) || (header.format.channel_number > 32) ||
(header.format.sample_rate < 4000) || (header.format.sample_rate > 192000) ||
(header.format.byte_per_sample < 1) || (header.format.byte_per_sample > 320) ||
(header.format.bits_per_sample < 8) || (header.format.bits_per_sample > 32))
+1 -1
View File
@@ -165,7 +165,7 @@ uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uin
for (j = 0; j < end; j += numChannels)
{
const SAMPLETYPE *ptr;
LONG_SAMPLETYPE sums[16];
LONG_SAMPLETYPE sums[SOUNDTOUCH_MAX_CHANNELS];
uint c;
int i;