diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index 915e9c7dc9..291be78cc8 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -136,6 +136,9 @@ static av_cold int decode_init(AVCodecContext *avctx) { static VLC_TYPE code_table[1 << CODE_VLC_BITS][2]; + if (avctx->width <= 1) + return AVERROR_INVALIDDATA; + avctx->pix_fmt = AV_PIX_FMT_YUV422P; code_vlc.table = code_table;