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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/28/merge
Michael Niedermayer 8 years ago
parent 2002436b0c
commit 9726e9f809
  1. 2
      libavcodec/ffv1dec_template.c

@ -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;
}

Loading…
Cancel
Save