diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-31 03:08:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-08 21:17:50 +0100 |
commit | 8be687a81f9beb818f0ddf44491ba259f1dcca1b (patch) | |
tree | d83f4ae8f17d921c26ddb8fbe71ba4f572cd35d7 | |
parent | 1827fe0989fd3ec3d9021078a8f46dbb6af31e2a (diff) | |
download | ffmpeg-8be687a81f9beb818f0ddf44491ba259f1dcca1b.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 adc2597dba..65879315e5 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2308,7 +2308,7 @@ the_end: } } } - if (s->flipped) { + if (s->flipped && !s->rgb) { int j; avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift); for (index=0; index<4; index++) { |