ffmpeg | branch: master | Claudio Freire <klaussfre...@gmail.com> | Wed Dec 9 17:36:32 2015 -0300| [124c3759386a98e9f47b3305cb18cee5e1707d73] | committer: Andreas Cadhalpun
AAC encoder: fix OOB access in search_for_pns Fix OOB access in search_for_pns which was using w2 outside the window group loop, and fix a typo in which it was checking sf_idx instead of band_type Reviewed-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=124c3759386a98e9f47b3305cb18cee5e1707d73 --- libavcodec/aaccoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 14862ec..7e55494 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -711,7 +711,7 @@ static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChanne /* Estimate rd on average as 5 bits for SF, 4 for the CB, plus spread energy * lambda/thr */ dist2 += band->energy/(band->spread*band->spread)*lambda*dist_thresh/band->threshold; } - if (g && sce->sf_idx[(w+w2)*16+g-1] == NOISE_BT) { + if (g && sce->band_type[w*16+g-1] == NOISE_BT) { dist2 += 5; } else { dist2 += 9; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog