You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
Merge commit '7e201d575dc4385eb67314b0419d4d77185e65f4'
* commit '7e201d575dc4385eb67314b0419d4d77185e65f4': jpeg2000: Validate block lengthinc Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user