vc1dec: Fix global array overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-28 10:44:43 +02:00
parent 8db2935db0
commit a60a4d7041

View File

@ -1049,8 +1049,8 @@ 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) { \
av_log(v->s.avctx,AV_LOG_ERROR, "zero mquant\n"); \
if (!mquant || mquant > 31) { \
av_log(v->s.avctx, AV_LOG_ERROR, "invalid mquant %d\n", mquant); \
mquant = 1; \
} \
}