Browse Source

avcodec/mjpegdec: Limit bayer to single plane outputting format

This reduces the number of paths reachable with DNG and should
improve security

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.4
Michael Niedermayer 5 years ago
parent
commit
865a34970e
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/mjpegdec.c

+ 5
- 0
libavcodec/mjpegdec.c View File

@@ -499,6 +499,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
}
}

if (s->bayer) {
if (pix_fmt_id != 0x11110000 && pix_fmt_id != 0x11000000)
goto unk_pixfmt;
}

switch (pix_fmt_id) {
case 0x11110000: /* for bayer-encoded huffman lossless JPEGs embedded in DNGs */
if (!s->bayer)


Loading…
Cancel
Save