1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-12 03:40:54 +01:00
parent 68329388bb
commit cc548ea7a6

View File

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