[FFmpeg-cvslog] vc1: check mb_height validity.

Luca Barbato git at videolan.org
Thu Sep 26 00:16:34 CEST 2013


ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Mon Aug  5 06:30:24 2013 +0200| [75b1b13aff73bbe78a4da756dd4c048dd3462cb0] | committer: Sean McGovern

vc1: check mb_height validity.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
(cherry picked from commit 43bacd5b7d3d265a77cd29d8abb131057796aecc)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

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

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 752f22f..e1aa4e6 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5581,6 +5581,12 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
             v->mv_f[1] = tmp[1];
         }
         mb_height = s->mb_height >> v->field_mode;
+
+        if (!mb_height) {
+            av_log(v->s.avctx, AV_LOG_ERROR, "Invalid mb_height.\n");
+            goto err;
+        }
+
         for (i = 0; i <= n_slices; i++) {
             if (i > 0 &&  slices[i - 1].mby_start >= mb_height) {
                 if (v->field_mode <= 0) {



More information about the ffmpeg-cvslog mailing list