Merge commit '7e201d575dc4385eb67314b0419d4d77185e65f4'

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/26/merge
Michael Niedermayer 12 years ago
commit db5c93a1a9
  1. 6
      libavcodec/jpeg2000dec.c

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

Loading…
Cancel
Save