mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +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:
parent
68329388bb
commit
cc548ea7a6
@ -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);
|
av_log(v->s.avctx, AV_LOG_ERROR, "end mb y %d %d invalid\n", s->end_mb_y, s->start_mb_y);
|
||||||
continue;
|
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);
|
ff_vc1_decode_blocks(v);
|
||||||
if (i != n_slices)
|
if (i != n_slices)
|
||||||
s->gb = slices[i].gb;
|
s->gb = slices[i].gb;
|
||||||
|
Loading…
Reference in New Issue
Block a user