avcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 5 Jun 2018 00:17:24 +0000 (02:17 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 6 Jun 2018 14:58:08 +0000 (16:58 +0200)
commit936f4a2c2e14ec753e8835f2e820b4cd9aec9a56
treeda0a6bfa29619da4a9ee5dec64eaf30889087b9e
parent79c6047c3668c639f717b3a7001a34dddba0ede2
avcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()

Fixes: signed integer overflow: 32768 + 2147450880 cannot be represented in type 'int'
Fixes: 7885/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THP_fuzzer-5298834394578944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c