[FFmpeg-cvslog] vc1: check image height, fix division by 0
Michael Niedermayer
git at videolan.org
Mon Nov 12 01:53:14 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 12 01:22:31 2012 +0100| [b5f4836f8cb374f1a5ae45db48b61a1dfba0daad] | committer: Michael Niedermayer
vc1: check image height, fix division by 0
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=b5f4836f8cb374f1a5ae45db48b61a1dfba0daad
---
libavcodec/vc1dec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 1e78f38..7c07138 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5521,6 +5521,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
goto err;
}
+ if ((s->mb_height >> v->field_mode) == 0) {
+ av_log(v->s.avctx, AV_LOG_ERROR, "image too short\n");
+ goto err;
+ }
+
// process pulldown flags
s->current_picture_ptr->f.repeat_pict = 0;
// Pulldown flags are only valid when 'broadcast' has been set.
More information about the ffmpeg-cvslog
mailing list