On Wed, Mar 21, 2012 at 10:39:10AM -0700, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" <[email protected]> > > Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind > CC: [email protected] > --- > libavcodec/indeo4.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c > index 573718e..3e8a398 100644 > --- a/libavcodec/indeo4.c > +++ b/libavcodec/indeo4.c > @@ -372,7 +372,8 @@ static int decode_band_hdr(IVI4DecContext *ctx, > IVIBandDesc *band, > > if (!get_bits1(&ctx->gb) || ctx->frame_type == FRAMETYPE_INTRA) { > transform_id = get_bits(&ctx->gb, 5); > - if (!transforms[transform_id].inv_trans) { > + if (transform_id >= FF_ARRAY_ELEMS(transforms) || > + !transforms[transform_id].inv_trans) { > av_log_ask_for_sample(avctx, "Unimplemented transform: > %d!\n", transform_id); > return AVERROR_PATCHWELCOME; > } > --
LGTM _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
