]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/msvideo1.c
avcodec/ac3enc: Use specific error code in validate_float_option()
[ffmpeg] / libavcodec / msvideo1.c
index 29700f54b66e9829729f3a6630298dcd7f44e32a..de048d8b6fb9a33fcf6889855ac054d6272853c7 100644 (file)
@@ -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;