mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/mobiclip: Check mv against INT_MAX
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 27369/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5083469356728320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a207df2acb
commit
a108a4d809
@ -1146,6 +1146,8 @@ static int predict_motion(AVCodecContext *avctx,
|
|||||||
mv.x = mv.x + get_se_golomb(gb);
|
mv.x = mv.x + get_se_golomb(gb);
|
||||||
mv.y = mv.y + get_se_golomb(gb);
|
mv.y = mv.y + get_se_golomb(gb);
|
||||||
}
|
}
|
||||||
|
if (mv.x >= INT_MAX || mv.y >= INT_MAX)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
motion[offsetm].x = mv.x;
|
motion[offsetm].x = mv.x;
|
||||||
motion[offsetm].y = mv.y;
|
motion[offsetm].y = mv.y;
|
||||||
|
Loading…
Reference in New Issue
Block a user