vc1: mquant is not allowed to be 0

Fixes out of bounds read.
Checked against SMPTE 421M-2006

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/3/merge
Michael Niedermayer 13 years ago
parent e93d911e48
commit 64c58f1436
  1. 4
      libavcodec/vc1dec.c

@ -1174,6 +1174,10 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
mquant = v->pq + mqdiff; \
else \
mquant = get_bits(gb, 5); \
if (!mquant) { \
av_log(v->s.avctx,AV_LOG_ERROR, "zero mquant\n"); \
mquant = 1; \
} \
} \
} \
if (v->dqprofile == DQPROFILE_SINGLE_EDGE) \

Loading…
Cancel
Save