ffmpeg | branch: release/2.4 | Michael Niedermayer <[email protected]> | Thu Oct 30 00:52:04 2014 +0000| [2a75c0b1ca16b5480497de0d4c79ef122406a0b5] | committer: Vittorio Giovara
aacsbr: change order of operation to prevent out of array read CC: [email protected] Bug-Id: CID 732250 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a75c0b1ca16b5480497de0d4c79ef122406a0b5 --- libavcodec/aacsbr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 4d2ac6c..dbfb167 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -549,7 +549,8 @@ static int sbr_hf_calc_npatches(AACContext *ac, SpectralBandReplication *sbr) k = sbr->n_master; } while (sb != sbr->kx[1] + sbr->m[1]); - if (sbr->patch_num_subbands[sbr->num_patches-1] < 3 && sbr->num_patches > 1) + if (sbr->num_patches > 1 && + sbr->patch_num_subbands[sbr->num_patches - 1] < 3) sbr->num_patches--; return 0; _______________________________________________ ffmpeg-cvslog mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
