Mark 32 bps stream with stereo decorrelation as unparsable

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19234
This commit is contained in:
Martijn van Beurden 2021-12-22 15:15:16 +01:00
parent b358381a10
commit 1fd178e747

View File

@ -2355,6 +2355,11 @@ FLAC__bool read_frame_header_(FLAC__StreamDecoder *decoder)
break;
}
if(decoder->private_->frame.header.bits_per_sample == 32 && decoder->private_->frame.header.channel_assignment != FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT){
/* Decoder isn't equipped for 33-bit side frame */
is_unparseable = true;
}
/* check to make sure that reserved bit is 0 */
if(raw_header[3] & 0x01) /* MAGIC NUMBER */
is_unparseable = true;