[FFmpeg-cvslog] avcodec/aacenc: Fix sample rate check

Michael Niedermayer git at videolan.org
Sun Feb 22 22:38:46 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Feb 22 22:25:27 2015 +0100| [704c980294aa8d442636e3a51121b74a6eb366bf] | committer: Michael Niedermayer

avcodec/aacenc: Fix sample rate check

Fixes out of array read
Fixes CID1257803, CID1257797, CID1257789, CID1257786

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=704c980294aa8d442636e3a51121b74a6eb366bf
---

 libavcodec/aacenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 635123e..aa6a56a 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -740,7 +740,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
 
     s->channels = avctx->channels;
 
-    ERROR_IF(i == 16,
+    ERROR_IF(i >= 12,
              "Unsupported sample rate %d\n", avctx->sample_rate);
     ERROR_IF(s->channels > AAC_MAX_CHANNELS,
              "Unsupported number of channels: %d\n", s->channels);



More information about the ffmpeg-cvslog mailing list