Commit a78ae465 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616...

avcodec/mjpegdec: Fix runtime error: signed integer overflow: -24543 * 2031616 cannot be represented in type 'int'

Fixes: 943/clusterfuzz-testcase-5114865297391616

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent fc4f8837
......@@ -776,7 +776,8 @@ static int decode_block_progressive(MJpegDecodeContext *s, int16_t *block,
uint16_t *quant_matrix,
int ss, int se, int Al, int *EOBRUN)
{
int code, i, j, level, val, run;
int code, i, j, val, run;
unsigned level;
if (*EOBRUN) {
(*EOBRUN)--;
......
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