diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 5f1014f0d4..7bb0235bdb 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -171,6 +171,9 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, int luma_size, chroma_size; ptrdiff_t luma_pitch, chroma_pitch; + luma_width = FFALIGN(luma_width , 2); + luma_height = FFALIGN(luma_height, 2); + if (luma_width < 16 || luma_width > 640 || luma_height < 16 || luma_height > 480 || luma_width & 1 || luma_height & 1) {