Commit ab8517b8 authored by Michael Niedermayer's avatar Michael Niedermayer

vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent dbc44667
...@@ -5498,6 +5498,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, ...@@ -5498,6 +5498,8 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
s->low_delay = !avctx->has_b_frames || v->res_sprite; s->low_delay = !avctx->has_b_frames || v->res_sprite;
if (v->profile == PROFILE_ADVANCED) { if (v->profile == PROFILE_ADVANCED) {
if(avctx->coded_width<=1 || avctx->coded_height<=1)
goto err;
s->h_edge_pos = avctx->coded_width; s->h_edge_pos = avctx->coded_width;
s->v_edge_pos = avctx->coded_height; s->v_edge_pos = avctx->coded_height;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment