aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-03-16 02:30:57 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-25 15:32:07 +0100
commit807d443c7eb4318c768f2b665c81defa405e9fe2 (patch)
tree9e8ffcb1628435b2dcae9f331302b12b746defaf
parent5e09dc8afebbdefa0b4c1b3d9e6b5b601e2b815b (diff)
downloadffmpeg-807d443c7eb4318c768f2b665c81defa405e9fe2.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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 2945d9948d..bc3f16827c 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -587,7 +587,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();