[FFmpeg-cvslog] avcodec/truemotion2: Fix integer overflow in last loop in tm2_update_block()

Michael Niedermayer git at videolan.org
Thu Jun 27 20:49:21 EEST 2019


ffmpeg | branch: release/4.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jun 13 19:45:50 2019 +0200| [ef73b0da2df22f5f589692961d17d2294cd2a457] | committer: Michael Niedermayer

avcodec/truemotion2: Fix integer overflow in last loop in tm2_update_block()

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 at niedermayer.cc>
(cherry picked from commit 3aecd0170413c7e56f19de4e34d093a2c4027c2a)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef73b0da2df22f5f589692961d17d2294cd2a457
---

 libavcodec/truemotion2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 8936741c6c..e1e9f63397 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -672,7 +672,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 */



More information about the ffmpeg-cvslog mailing list