[FFmpeg-cvslog] vc1dec: Override invalid macroblock quantizer

Michael Niedermayer git at videolan.org
Sun Jul 29 02:26:22 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul 28 18:07:45 2012 +0600| [45838561f2f14339acdf53ffa3adbfe8e6db7514] | committer: Kostya Shishkov

vc1dec: Override invalid macroblock quantizer

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>

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

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

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fd515c7..c6cbfc1 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1048,6 +1048,11 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
             mquant = v->altpq;                                 \
         if ((edges&8) && s->mb_y == (s->mb_height - 1))        \
             mquant = v->altpq;                                 \
+        if (!mquant || mquant > 31) {                          \
+            av_log(v->s.avctx, AV_LOG_ERROR,                   \
+                   "Overriding invalid mquant %d\n", mquant);  \
+            mquant = 1;                                        \
+        }                                                      \
     }
 
 /**



More information about the ffmpeg-cvslog mailing list