diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-06-05 02:09:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-07-10 01:52:56 +0200 |
commit | ea0734e3f011964e12da5f7d8dacf4a86670cbf0 (patch) | |
tree | a6f125c4b30d01d96637b71c67ed43851c641e9c | |
parent | 4c3a7aaea8ba76225780bd867a053bb0084503d6 (diff) | |
download | ffmpeg-ea0734e3f011964e12da5f7d8dacf4a86670cbf0.tar.gz |
avcodec/truemotion2: Fix overflow in tm2_apply_deltas()
Fixes: signed integer overflow: 1077952576 + 1077952576 cannot be represented in type 'int'
Fixes: 7712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5056281753681920
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 79c6047c3668c639f717b3a7001a34dddba0ede2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/truemotion2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index dbcef42462..d290326bf5 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -443,7 +443,7 @@ static inline int GET_TOK(TM2Context *ctx,int type) /* common operations - add deltas to 4x4 block of luma or 2x2 blocks of chroma */ static inline void tm2_apply_deltas(TM2Context *ctx, int* Y, int stride, int *deltas, int *last) { - int ct, d; + unsigned ct, d; int i, j; for (j = 0; j < 4; j++){ |