aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-13 23:24:04 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-14 00:21:50 +0200
commit236912f78923f335555d08403f5b55f1ca73202d (patch)
tree1236b695d3016c9aa1c046c0e697df0e17ecdd65 /libavcodec
parent9fb677dd825618fd5e44b955e7f8d2ad7333ab3d (diff)
downloadffmpeg-236912f78923f335555d08403f5b55f1ca73202d.tar.gz
avcodec/ffv1dec: Fix runtime error: signed integer overflow: 1550964438 + 1550964438 cannot be represented in type 'int'
Fixes: 1559/clusterfuzz-testcase-minimized-5048096079740928 Fixes: 1560/clusterfuzz-testcase-minimized-6011037813833728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 8630b2cd36c57918acfe18302fe77d1ceefbd676) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index c3f43b838d..20921c6adf 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -45,7 +45,8 @@ static inline av_flatten int get_symbol_inline(RangeCoder *c, uint8_t *state,
if (get_rac(c, state + 0))
return 0;
else {
- int i, e, a;
+ int i, e;
+ unsigned a;
e = 0;
while (get_rac(c, state + 1 + FFMIN(e, 9))) { // 1..10
e++;