summaryrefslogtreecommitdiff
path: root/libavcodec/vorbisdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r--libavcodec/vorbisdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 4dd47ac715..225f1e9414 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -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,