Commit 8502b4ae authored by Paul B Mahol's avatar Paul B Mahol Committed by Michael Niedermayer
Browse files

binkaudio: check number of channels


Fixes #1380.
Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
(cherry picked from commit 824a6975

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
......@@ -85,9 +85,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;
}
if (avctx->extradata && avctx->extradata_size > 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