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>
Mon, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commit0c645bd73c7a80d7fbe4b21e4487520d7dd280b4
tree615af4fe9d393d23a94381ca164b2130e999d1e7
parentaee71463fb2f1224e273d4f612ee7d6d63206219
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>
(cherry picked from commit 936f4a2c2e14ec753e8835f2e820b4cd9aec9a56)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c