Mark 32 bps stream with stereo decorrelation as unparsable

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19234

Signed-off-by: Ralph Giles <giles@thaumas.net>
This commit is contained in:
Martijn van Beurden 2021-12-22 15:15:16 +01:00 committed by Ralph Giles
parent e1575e4a7c
commit aa126b8f2f
No known key found for this signature in database
GPG Key ID: 9259A8F2D2D44C84

View File

@ -2359,6 +2359,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;
}
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
/* check to make sure that reserved bit is 0 */
if(raw_header[3] & 0x01) /* MAGIC NUMBER */