avcodec/mjpegdec: Disallow progressive bayer images

Fixes: Null pointer dereference
Fixes: sample1.dng
Found-by: South East <8billion.people@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6d8285633d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 2 months ago
parent 3417e955c3
commit 49e4c1717f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 4
      libavcodec/mjpegdec.c

@ -468,6 +468,10 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
if (s->avctx->height <= 0)
return AVERROR_INVALIDDATA;
}
if (s->bayer && s->progressive) {
avpriv_request_sample(s->avctx, "progressively coded bayer picture");
return AVERROR_INVALIDDATA;
}
if (s->got_picture && s->interlaced && (s->bottom_field == !s->interlace_polarity)) {
if (s->progressive) {

Loading…
Cancel
Save