Merge commit '7e201d575dc4385eb67314b0419d4d77185e65f4'

* commit '7e201d575dc4385eb67314b0419d4d77185e65f4':
  jpeg2000: Validate block lengthinc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-07-03 14:20:36 +02:00
commit db5c93a1a9
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}