]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/truemotion2: Fix integer overflow in last loop in tm2_update_block()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 13 Jun 2019 17:45:50 +0000 (19:45 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 25 Jun 2019 11:30:09 +0000 (13:30 +0200)
Fixes: signed integer overflow: -1727985666 - 538976288 cannot be represented in type 'int'
Fixes: 15031/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5100228035739648
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/truemotion2.c

index ade214effcd7e87e42241d2229491f625dd46a03..a86dd16e0fef6c1c3b0861e7fcb59241786b4271 100644 (file)
@@ -681,7 +681,7 @@ static inline void tm2_still_block(TM2Context *ctx, AVFrame *pic, int bx, int by
 static inline void tm2_update_block(TM2Context *ctx, AVFrame *pic, int bx, int by)
 {
     int i, j;
-    int d;
+    unsigned d;
     TM2_INIT_POINTERS_2();
 
     /* update chroma */