1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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

Fixes: 1724/clusterfuzz-testcase-minimized-4842395432648704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-05-21 21:49:54 +02:00
parent 7f60dc03a0
commit 40fa6a2fa2

View File

@ -757,7 +757,7 @@ static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block,
int component, int dc_index,
uint16_t *quant_matrix, int Al)
{
int val;
unsigned val;
s->bdsp.clear_block(block);
val = mjpeg_decode_dc(s, dc_index);
if (val == 0xfffff) {