diff --git a/libavcodec/iff.c b/libavcodec/iff.c index c911811da4..901c8f4e6c 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -115,6 +115,8 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR_INVALIDDATA; } + if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height))) + return err; s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE); if (!s->planebuf)