Commit e7a7b313 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun

vorbisdec: reject rangebits 0 with non-0 partitions

This causes non-unique elements in floor_setup->data.t1.list, which
makes the stream undecodable according to the specification.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
parent e1c5170c
......@@ -573,6 +573,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc)
return AVERROR(ENOMEM);
rangebits = get_bits(gb, 4);
if (!rangebits && floor_setup->data.t1.partitions) {
av_log(vc->avctx, AV_LOG_ERROR,
"A rangebits value of 0 is not compliant with the Vorbis I specification.\n");
return AVERROR_INVALIDDATA;
}
rangemax = (1 << rangebits);
if (rangemax > vc->blocksize[1] / 2) {
av_log(vc->avctx, AV_LOG_ERROR,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment