[FFmpeg-cvslog] aacdec: check channel count
Michael Niedermayer
git at videolan.org
Mon Feb 18 01:09:56 CET 2013
ffmpeg | branch: release/0.7 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 27 20:37:27 2013 +0100| [e6ac11e41734cbb24ec5e6c73264d030e5f07a64] | committer: Michael Niedermayer
aacdec: check channel count
Prevent out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 96f452ac647dae33c53c242ef3266b65a9beafb6)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6ac11e41734cbb24ec5e6c73264d030e5f07a64
---
libavcodec/aacdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a0f5344..78176d0 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -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);
More information about the ffmpeg-cvslog
mailing list