aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-31 03:08:33 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-03 15:59:14 +0100
commit72d5addc0beadc0593bdd494de89281dd9f69255 (patch)
treef37c12cdadad39c66e1b41e72ae916eaf95dfc4a
parenta0b7a3c8aaa8fa355b899ebe6b55d5f709abc9b2 (diff)
downloadffmpeg-72d5addc0beadc0593bdd494de89281dd9f69255.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index f002ccd866..094fc47f31 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2366,7 +2366,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++) {