Commit e20e5b38 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1223696c)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9e96567e
...@@ -587,7 +587,8 @@ static inline void tm2_null_res_block(TM2Context *ctx, AVFrame *pic, int bx, int ...@@ -587,7 +587,8 @@ static inline void tm2_null_res_block(TM2Context *ctx, AVFrame *pic, int bx, int
{ {
int i; int i;
int ct; int ct;
int left, right, diff; unsigned left, right;
int diff;
int deltas[16]; int deltas[16];
TM2_INIT_POINTERS(); TM2_INIT_POINTERS();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment