mirror of https://git.ffmpeg.org/ffmpeg.git
vc1dec: check end_mb_y / start_mb_y validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c4ce870967
commit
e985cfd18b
|
@ -5606,6 +5606,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
|||
s->end_mb_y = (i == n_slices ) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height);
|
||||
else
|
||||
s->end_mb_y = (i <= n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height);
|
||||
if (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;
|
||||
}
|
||||
vc1_decode_blocks(v);
|
||||
if (i != n_slices)
|
||||
s->gb = slices[i].gb;
|
||||
|
|
Loading…
Reference in New Issue