ALAC: Enable release check from original code

The original code that this was copied from only disabled this check in
debug builds as described in the comment, however doing so also allows
`channelIndex` to increase without bounds and can lead to writing past
the end of the output buffer.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27503
This commit is contained in:
bobsayshilol 2021-04-25 19:10:07 +01:00 committed by evpobr
parent f1db22760b
commit 949c89122d

View File

@ -554,7 +554,7 @@ alac_decode (ALAC_DECODER *p, struct BitBuffer * bits, int32_t * sampleBuffer, u
}
}
#if 0 // ! DEBUG
#if 1 // ! DEBUG
// if we've decoded all of our channels, bail (but not in debug b/c we want to know if we're seeing bad bits)
// - this also protects us if the config does not match the bitstream or crap data bits follow the audio bits
if (channelIndex >= numChannels)