aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-03-16 02:30:57 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-02 19:41:47 +0100
commit0b93f593184cadffd25ed7af9d0c90c8da9e2430 (patch)
tree468c103b4c937c770a834727fd7ccf9464721629
parentce5fb015aceefc1c8dcfd1aff53a5ceade2a47b1 (diff)
downloadffmpeg-0b93f593184cadffd25ed7af9d0c90c8da9e2430.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 0bce97fef0..a42a1adefd 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -579,7 +579,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();