[FFmpeg-cvslog] vc1dec: require a minimum of 2x2 for the edge pos. Avoid assertion failure

Michael Niedermayer git at videolan.org
Wed Nov 14 19:28:45 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 14 19:03:07 2012 +0100| [ab8517b89196890ca9f9b1ccd70acec838a9129b] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab8517b89196890ca9f9b1ccd70acec838a9129b
---

 libavcodec/vc1dec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 2afe176..8fbdbdf 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;
         }



More information about the ffmpeg-cvslog mailing list