1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-12 15:40:50 +02:00

aacsbr: fix integer overflow

Fixes CID603186
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-04 17:30:56 +01:00
parent b5d496f3a4
commit a15adabdd3

View File

@ -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;