Commit 13451f55 authored by Michael Niedermayer's avatar Michael Niedermayer

atrac3dec: Check coding mode against channels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5ee008e0
......@@ -916,6 +916,11 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
if (q->coding_mode == JOINT_STEREO && avctx->channels < 2) {
av_log(avctx, AV_LOG_ERROR, "Invalid coding mode\n");
return AVERROR_INVALIDDATA;
}
/* Check the extradata */
if (version != 4) {
......
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