mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-25 16:21:13 +00:00
aacdec: check channel count
Prevent out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96f452ac64
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2cac35086c
commit
e6ac11e417
@ -568,6 +568,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
|
||||
output_scale_factor = 1.0;
|
||||
}
|
||||
|
||||
if (avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
AAC_INIT_VLC_STATIC( 0, 304);
|
||||
AAC_INIT_VLC_STATIC( 1, 270);
|
||||
AAC_INIT_VLC_STATIC( 2, 550);
|
||||
|
Loading…
Reference in New Issue
Block a user