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>
Wed, 25 Jan 2017 23:34:12 +0000 (00:34 +0100)
commitcd81993070e8d53982430c42bd2210c549ae34cc
tree8be13965d9467fd2d4e7c4844e771efdd3334b01
parent2481f1320a7f3073415897e4ba82c1455f0ec996
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