Browse Source

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>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
64c58f1436
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/vc1dec.c

+ 4
- 0
libavcodec/vc1dec.c View File

@@ -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