Browse Source

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>
(cherry picked from commit 4de4308d2a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.7
Michael Niedermayer 8 years ago
parent
commit
13c0467c49
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/ffv1dec_template.c

+ 1
- 1
libavcodec/ffv1dec_template.c View File

@@ -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) + diff, bits);
}


Loading…
Cancel
Save