Browse code

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

Michael Niedermayer authored on 2014/11/25 09:14:38
Showing 1 changed files
... ...
@@ -514,6 +514,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
514 514
         else              s->avctx->pix_fmt = AV_PIX_FMT_YUV420P16;
515 515
         s->avctx->color_range = s->cs_itu601 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
516 516
         if (pix_fmt_id == 0x42111100) {
517
+            if (s->bits > 8)
518
+                goto unk_pixfmt;
517 519
             s->upscale_h = 6;
518 520
             s->chroma_height = (s->height + 1) / 2;
519 521
         }