mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
vc1dec: check that coded slice positions and interlacing match.
This fixes out of array writes Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
df23d64e07
commit
5e59a77cec
@ -5578,6 +5578,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
|
||||
mb_height = s->mb_height >> v->field_mode;
|
||||
for (i = 0; i <= n_slices; i++) {
|
||||
if (i > 0 && slices[i - 1].mby_start >= mb_height) {
|
||||
if(v->field_mode <= 0) {
|
||||
av_log(v->s.avctx, AV_LOG_ERROR, "invalid end_mb_y %d\n", slices[i - 1].mby_start);
|
||||
continue;
|
||||
}
|
||||
v->second_field = 1;
|
||||
v->blocks_off = s->mb_width * s->mb_height << 1;
|
||||
v->mb_off = s->mb_stride * s->mb_height >> 1;
|
||||
|
Loading…
Reference in New Issue
Block a user