diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-12-31 03:08:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-08-23 13:15:16 +0200 |
commit | 14e5d6a009ea7927a8615b6e253a27ca248708ff (patch) | |
tree | f1f0c0d14c70489367ecacfad3c3e7ebb9a689f1 /libavcodec | |
parent | 3490a9f8c89dea78e240014932ab12a47d1afb3d (diff) | |
download | ffmpeg-14e5d6a009ea7927a8615b6e253a27ca248708ff.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>
Diffstat (limited to 'libavcodec')
-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 55313525c0..83e26335ab 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -2199,7 +2199,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++) { |