mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
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:
parent
f1db22760b
commit
949c89122d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user