Commit 9726e9f8 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ffv1dec_template: Fix runtime error: signed integer overflow: 202 +...

avcodec/ffv1dec_template: Fix runtime error: signed integer overflow: 202 + 2147483615 cannot be represented in type 'int'

Fixes: 1748/clusterfuzz-testcase-minimized-6690208340770816

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 2002436b
......@@ -98,7 +98,7 @@ static av_always_inline void RENAME(decode_line)(FFV1Context *s, int w,
if (sign)
diff = -diff;
sample[1][x] = av_mod_uintp2(RENAME(predict)(sample[1] + x, sample[0] + x) + diff, bits);
sample[1][x] = av_mod_uintp2(RENAME(predict)(sample[1] + x, sample[0] + x) + (SUINT)diff, bits);
}
s->run_index = run_index;
}
......
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