[FFmpeg-cvslog] aacsbr: fix integer overflow

Michael Niedermayer git at videolan.org
Sun Nov 4 17:50:02 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov  4 17:30:56 2012 +0100| [a15adabdd32c8736c143fcbef36a0f4a75f772f0] | committer: Michael Niedermayer

aacsbr: fix integer overflow

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

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

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

diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index 1d15177..ceff2ea 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -749,7 +749,7 @@ static int read_sbr_grid(AACContext *ac, SpectralBandReplication *sbr,
         if (ch_data->bs_frame_class == FIXFIX) {
             idx = ch_data->bs_num_env >> 1;
         } else if (ch_data->bs_frame_class & 1) { // FIXVAR or VARVAR
-            idx = ch_data->bs_num_env - FFMAX(bs_pointer - 1, 1);
+            idx = ch_data->bs_num_env - FFMAX((int)bs_pointer - 1, 1);
         } else { // VARFIX
             if (!bs_pointer)
                 idx = 1;



More information about the ffmpeg-cvslog mailing list