summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-14 19:03:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-14 19:16:08 +0100
commitab8517b89196890ca9f9b1ccd70acec838a9129b (patch)
tree9d55d409e3b24b6c9d1c3d1af6cea756f8af76bd /libavcodec
parentdbc44667ce3dabb0d202f064e46066284be36747 (diff)
vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dec.c2
1 files changed, 2 insertions, 0 deletions
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;
}