mirror of https://git.ffmpeg.org/ffmpeg.git
binkaudio: check number of channels
Fixes #1380.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 824a6975ee
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ece27b09d6
commit
aefa2bf70a
|
@ -91,9 +91,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||
frame_len_bits = 11;
|
||||
}
|
||||
|
||||
if (avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
|
||||
return -1;
|
||||
if (avctx->channels < 1 || avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid number of channels: %d\n", avctx->channels);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
s->version_b = avctx->extradata && avctx->extradata[3] == 'b';
|
||||
|
|
Loading…
Reference in New Issue