diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 2afe176f11..8fbdbdf2cb 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5498,6 +5498,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, s->low_delay = !avctx->has_b_frames || v->res_sprite; if (v->profile == PROFILE_ADVANCED) { + if(avctx->coded_width<=1 || avctx->coded_height<=1) + goto err; s->h_edge_pos = avctx->coded_width; s->v_edge_pos = avctx->coded_height; }