Commit db5c93a1 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7e201d57'

* commit '7e201d57':
  jpeg2000: Validate block lengthinc
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents f0358dc1 7e201d57
......@@ -674,6 +674,12 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s,
cblk->lblock += llen;
if ((ret = get_bits(s, av_log2(newpasses) + cblk->lblock)) < 0)
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->npasses += newpasses;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment