aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-13 19:45:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-11 20:18:46 +0100
commit47ccbb18eb9e24666917ce1e96222f1bed8d0b95 (patch)
tree4e88d905c50db673a0955a58579490358a97750c
parentc8253da8b70beb8dbfac3914cbc66ce7f8a5ff3f (diff)
downloadffmpeg-47ccbb18eb9e24666917ce1e96222f1bed8d0b95.tar.gz
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@niedermayer.cc> (cherry picked from commit 3aecd0170413c7e56f19de4e34d093a2c4027c2a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/truemotion2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index d59095622d..4e3a429777 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -668,7 +668,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 */