Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-12-31 05:08:33 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-01-26 02:34:12 +0300
commitcd81993070e8d53982430c42bd2210c549ae34cc (patch)
tree8be13965d9467fd2d4e7c4844e771efdd3334b01 /libavcodec/mjpegdec.c
parent2481f1320a7f3073415897e4ba82c1455f0ec996 (diff)
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/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 742e07c888..eee8d58147 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2386,7 +2386,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));