[FFmpeg-cvslog] avcodec/mjpegdec: Check for pixfmtid 0x42111100 || 0x24111100 with more than 8 bits

Michael Niedermayer git at videolan.org
Tue Jan 6 19:35:23 CET 2015


ffmpeg | branch: release/2.3 | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 25 01:14:38 2014 +0100| [142896f2d0e26dd7291ecd8c999b499a7bdd8cf4] | committer: Michael Niedermayer

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 at gmx.at>
(cherry picked from commit 0bf416f2628137e5389050fa323c329692dd4ba6)

Conflicts:

	libavcodec/mjpegdec.c
(cherry picked from commit bc73ee996b08b331d5a6c41df6acdd53e8deeb5d)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=142896f2d0e26dd7291ecd8c999b499a7bdd8cf4
---

 libavcodec/mjpegdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b29b340..37652e9 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -513,6 +513,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 / 2;
         }



More information about the ffmpeg-cvslog mailing list