[FFmpeg-cvslog] vc1: mquant is not allowed to be 0
Michael Niedermayer
git at videolan.org
Fri Mar 2 19:03:39 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Mar 2 18:24:21 2012 +0100| [64c58f143604223fa02ad4f11b40fb128f72aae5] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64c58f143604223fa02ad4f11b40fb128f72aae5
---
libavcodec/vc1dec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 2d3a94c..6fb6b17 100644
--- a/libavcodec/vc1dec.c
+++ b/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) \
More information about the ffmpeg-cvslog
mailing list