提交 9806fbd5 编写于 作者: P Peter Ross 提交者: Mans Rullgard

binkaudio: fix channel count check

Perform validity check on AVFormatContext.channels instead of
uninitialised field.

This fixes issue 2001.
Signed-off-by: NMans Rullgard <mans@mansr.com>
上级 d06497f3
......@@ -85,8 +85,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
s->frame_len = 1 << frame_len_bits;
if (s->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", s->channels);
if (avctx->channels > MAX_CHANNELS) {
av_log(s->avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册