Commit 04e61147 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/opus: Check count of ambisonic channels

https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1
specifies the maximum as 227
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fcf3e06f
......@@ -381,6 +381,10 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
" for nonnegative integer n\n");
return AVERROR_INVALIDDATA;
}
if (channels > 227) {
av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
return AVERROR_INVALIDDATA;
}
layout = 0;
} else
layout = 0;
......
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