mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mpeg4videodec: more unsigned in amv computation
Fixes: signed integer overflow: -2147483648 + -1048576 cannot be represented in type 'int'
Fixes: 59365/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-642654923954585
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 0adaa90d89
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7e27518e98
commit
c4a7dbdbee
|
@ -616,7 +616,7 @@ static inline int get_amv(Mpeg4DecContext *ctx, int n)
|
||||||
for (y = 0; y < 16; y++) {
|
for (y = 0; y < 16; y++) {
|
||||||
int v;
|
int v;
|
||||||
|
|
||||||
v = mb_v + dy * y;
|
v = mb_v + (unsigned)dy * y;
|
||||||
// FIXME optimize
|
// FIXME optimize
|
||||||
for (x = 0; x < 16; x++) {
|
for (x = 0; x < 16; x++) {
|
||||||
sum += v >> shift;
|
sum += v >> shift;
|
||||||
|
|
Loading…
Reference in New Issue