X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmsvideo1.c;h=de048d8b6fb9a33fcf6889855ac054d6272853c7;hb=c6db2e97dcd246234b958814450d3fd12a5c8c27;hp=29700f54b66e9829729f3a6630298dcd7f44e32a;hpb=18195e570cfb83149e5eea203b4b5ee84babd420;p=ffmpeg diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index 29700f54b66..de048d8b6fb 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -62,6 +62,9 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx) s->avctx = avctx; + if (avctx->width < 4 || avctx->height < 4) + return AVERROR_INVALIDDATA; + /* figure out the colorspace based on the presence of a palette */ if (s->avctx->bits_per_coded_sample == 8) { s->mode_8bit = 1;