mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/mpeg4videodec: Fix 2 integer overflows in get_amv()
Fixes: signed integer overflow: -144876608 * 16 cannot be represented in type 'int'
Fixes: 22782/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6039584977977344
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 e361785ee0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c11634ad75
commit
425c0eafae
@ -549,7 +549,7 @@ static inline int get_amv(Mpeg4DecContext *ctx, int n)
|
||||
dy -= 1 << (shift + a + 1);
|
||||
else
|
||||
dx -= 1 << (shift + a + 1);
|
||||
mb_v = s->sprite_offset[0][n] + dx * s->mb_x * 16 + dy * s->mb_y * 16;
|
||||
mb_v = s->sprite_offset[0][n] + dx * s->mb_x * 16U + dy * s->mb_y * 16U;
|
||||
|
||||
sum = 0;
|
||||
for (y = 0; y < 16; y++) {
|
||||
|
Loading…
Reference in New Issue
Block a user