[FFmpeg-cvslog] vc1dec: ensure cbpcy_vlc has been set before decoding a frame.
Michael Niedermayer
git at videolan.org
Sat Jan 12 05:09:33 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 12 03:40:54 2013 +0100| [cc548ea7a60355e15ed78431a55a896db074aa11] | committer: Michael Niedermayer
vc1dec: ensure cbpcy_vlc has been set before decoding a frame.
Fixes null pointer dereference
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=cc548ea7a60355e15ed78431a55a896db074aa11
---
libavcodec/vc1dec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fa25161..7be1c8c 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5711,6 +5711,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
av_log(v->s.avctx, AV_LOG_ERROR, "end mb y %d %d invalid\n", s->end_mb_y, s->start_mb_y);
continue;
}
+ if (!v->p_frame_skipped && s->pict_type != AV_PICTURE_TYPE_I && !v->cbpcy_vlc) {
+ av_log(v->s.avctx, AV_LOG_ERROR, "missing cbpcy_vlc\n");
+ continue;
+ }
ff_vc1_decode_blocks(v);
if (i != n_slices)
s->gb = slices[i].gb;
More information about the ffmpeg-cvslog
mailing list