Commit cc548ea7 authored by Michael Niedermayer's avatar 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 68329388
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment