aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-25 01:14:38 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-30 21:40:36 +0100
commit47f345de1dd25178f82f3da68fc584050d3f0ad2 (patch)
tree425a8d19e04687e1bbc9d1ea0773a5af051c918d /libavcodec
parentaf0a95ee033b61113a7059ac66e2f5776c90330c (diff)
downloadffmpeg-47f345de1dd25178f82f3da68fc584050d3f0ad2.tar.gz
avcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits
These cases are not supported yet Fixes assertion failure Fixes: signal_sigabrt_7ffff6ac7bb9_1_cov_1553101927_00.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 0bf416f2628137e5389050fa323c329692dd4ba6) Conflicts: libavcodec/mjpegdec.c
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 89666729ca..2cf55fd877 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -514,6 +514,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
else s->avctx->pix_fmt = AV_PIX_FMT_YUV420P16;
s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
if (pix_fmt_id == 0x42111100) {
+ if (s->bits > 8)
+ goto unk_pixfmt;
s->upscale_h = 6;
s->chroma_height = (s->height + 1) / 2;
}