diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-16 02:08:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-16 02:09:43 +0200 |
commit | 4de4308d2aa3bfaa286ab566caf087d523cf9a85 (patch) | |
tree | d37e61a819788fec0cc7f6b751126de5fd90f0c3 /libavcodec/ffv1dec_template.c | |
parent | 0ef8f03133a0bd83c74200a8cf30982c0f574016 (diff) | |
download | ffmpeg-4de4308d2aa3bfaa286ab566caf087d523cf9a85.tar.gz |
avcodec/ffv1dec_template: Fix signed integer overflow
Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 2634/clusterfuzz-testcase-minimized-4540890636877824
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec_template.c')
-rw-r--r-- | libavcodec/ffv1dec_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c index 36cfba9560..61cdc90116 100644 --- a/libavcodec/ffv1dec_template.c +++ b/libavcodec/ffv1dec_template.c @@ -96,7 +96,7 @@ static av_always_inline void RENAME(decode_line)(FFV1Context *s, int w, } if (sign) - diff = -diff; + diff = -(unsigned)diff; sample[1][x] = av_mod_uintp2(RENAME(predict)(sample[1] + x, sample[0] + x) + (SUINT)diff, bits); } |