1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

avcodec/alsdec: Fixes signed integer overflow in LSB addition

Fixes: signed integer overflow: 8 * 536870912 cannot be represented in type 'int'
Fixes: 15281/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5744458785619968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7f527021df73b4792323f38f84a4bf2fbe5a2052)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-06-21 00:47:16 +02:00
parent 36c278078d
commit 3e491e9c59

View File

@ -872,7 +872,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
res >>= 1;
if (cur_k) {
res *= 1 << cur_k;
res *= 1U << cur_k;
res |= get_bits_long(gb, cur_k);
}
}