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> (cherry picked from commit 865a34970e73b9c23e33fd6dc6ba046d4e821519) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f98f29de5e
commit
11a10e30a9
@ -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) {
|
switch (pix_fmt_id) {
|
||||||
case 0x11110000: /* for bayer-encoded huffman lossless JPEGs embedded in DNGs */
|
case 0x11110000: /* for bayer-encoded huffman lossless JPEGs embedded in DNGs */
|
||||||
if (!s->bayer)
|
if (!s->bayer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user