avcodec/mjpegdec: check that component linesize is always valid
This commit is contained in:
parent
a9d15d43eb
commit
55753fc712
@ -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);
|
"error y=%d x=%d\n", mb_y, mb_x);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (ptr) {
|
if (ptr && linesize[c]) {
|
||||||
s->idsp.idct_put(ptr, linesize[c], s->block);
|
s->idsp.idct_put(ptr, linesize[c], s->block);
|
||||||
if (s->bits & 7)
|
if (s->bits & 7)
|
||||||
shift_output(s, ptr, linesize[c]);
|
shift_output(s, ptr, linesize[c]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user