diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-21 21:49:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-22 02:59:02 +0200 |
commit | 9a993c5bc89e2c14d7ecf41a282b44f4cc083369 (patch) | |
tree | 7954af91c0a2c7fed607da3e4df8a7dc3b29cb82 | |
parent | 96f0b1de49592044eee5ca2c549ecb81b31d3a3f (diff) | |
download | ffmpeg-9a993c5bc89e2c14d7ecf41a282b44f4cc083369.tar.gz |
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>
(cherry picked from commit 40fa6a2fa2c255293a780a194eecae5df52644a1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index e9705f2694..b23b5d2d70 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -728,7 +728,7 @@ static int decode_dc_progressive(MJpegDecodeContext *s, int16_t *block, int component, int dc_index, int16_t *quant_matrix, int Al) { - int val; + unsigned val; s->bdsp.clear_block(block); val = mjpeg_decode_dc(s, dc_index); if (val == 0xfffff) { |