diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-16 02:30:57 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-31 23:30:09 +0200 |
commit | cb4768e7f20b6bc6eef28266ee9a3361967e65df (patch) | |
tree | 5b2c5b8b978b1ec9b0df0abe3ce4efb4ca49d397 | |
parent | 6972b353b4e00f784b9e70939e4d37dc61295e28 (diff) | |
download | ffmpeg-cb4768e7f20b6bc6eef28266ee9a3361967e65df.tar.gz |
avcodec/truemotion2: Fix integer overflow in tm2_null_res_block()
Fixes: signed integer overflow: 1111638592 - -2122219136 cannot be represented in type 'int'
Fixes: 13441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5732769815068672
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 1223696c725a8ea7e80498e6ccfab37eea179b76)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/truemotion2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index c583ff4032..1aa7a4b870 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -591,7 +591,8 @@ static inline void tm2_null_res_block(TM2Context *ctx, AVFrame *pic, int bx, int { int i; int ct; - int left, right, diff; + unsigned left, right; + int diff; int deltas[16]; TM2_INIT_POINTERS(); |