avcodec/mjpegdec: Check for rgb before flipping
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 31 Dec 2016 02:08:33 +0000 (03:08 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 Feb 2017 14:59:14 +0000 (15:59 +0100)
commit72d5addc0beadc0593bdd494de89281dd9f69255
treef37c12cdadad39c66e1b41e72ae916eaf95dfc4a
parenta0b7a3c8aaa8fa355b899ebe6b55d5f709abc9b2
avcodec/mjpegdec: Check for rgb before flipping

Fixes assertion failure due to unsupported case

Fixes: 356/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_MJPEG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 25d9643f1172ae6a210c671195ba3135895abaf3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c