diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-31 03:08:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-08 20:32:01 +0100 |
commit | d5948243f51efea08bf27ac8f68845df79d55f57 (patch) | |
tree | aa12b8dcfc9ad87659c207c21d7ba1539c7f26c1 | |
parent | 8c3e90f5edd13e667030101d56e34635b2252706 (diff) | |
download | ffmpeg-d5948243f51efea08bf27ac8f68845df79d55f57.tar.gz |
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>
-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 0645a1d2ac..059c1c6fe9 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2383,7 +2383,7 @@ the_end: } } } - if (s->flipped) { + if (s->flipped && !s->rgb) { int j; avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift); av_assert0(s->nb_components == av_pix_fmt_count_planes(s->picture_ptr->format)); |