Merge commit '7e201d575dc4385eb67314b0419d4d77185e65f4'
* commit '7e201d575dc4385eb67314b0419d4d77185e65f4': jpeg2000: Validate block lengthinc Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
db5c93a1a9
@ -674,6 +674,12 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
|
|||||||
cblk->lblock += llen;
|
cblk->lblock += llen;
|
||||||
if ((ret = get_bits(s, av_log2(newpasses) + cblk->lblock)) < 0)
|
if ((ret = get_bits(s, av_log2(newpasses) + cblk->lblock)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
if (ret > sizeof(cblk->data)) {
|
||||||
|
avpriv_request_sample(s->avctx,
|
||||||
|
"Block with lengthinc greater than %zu",
|
||||||
|
sizeof(cblk->data));
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
cblk->lengthinc = ret;
|
cblk->lengthinc = ret;
|
||||||
cblk->npasses += newpasses;
|
cblk->npasses += newpasses;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user