avcodec/mjpegdec: check that component linesize is always valid

pull/388/head
Paul B Mahol 2 years ago
parent a9d15d43eb
commit 55753fc712
  1. 2
      libavcodec/mjpegdec.c

@ -1512,7 +1512,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
"error y=%d x=%d\n", mb_y, mb_x);
return AVERROR_INVALIDDATA;
}
if (ptr) {
if (ptr && linesize[c]) {
s->idsp.idct_put(ptr, linesize[c], s->block);
if (s->bits & 7)
shift_output(s, ptr, linesize[c]);

Loading…
Cancel
Save