avcodec/truemotion2: Fix several integer overflows in tm2_motion_block()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 8 Jul 2019 21:00:09 +0000 (23:00 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 4 Aug 2019 19:16:28 +0000 (21:16 +0200)
commita2c8df28c9c6d63d2ce7fb04e9aa677da07246ea
tree7307d8d0d7581c83a0c465dfae5226945b7bbb71
parentf30d67341e19b8ad1e06afb915e70733342293c7
avcodec/truemotion2: Fix several integer overflows in tm2_motion_block()

Fixes: 15524/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5173148372172800
Fixes: signed integer overflow: 13701388 - -2134868270 cannot be represented in type 'int'

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 9a353ea8766206bd302f3f12ca1d226237542908)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/truemotion2.c