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

vc1: check image height, fix division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-12 01:22:31 +01:00
parent 8824a9ed22
commit b5f4836f8c

View File

@ -5521,6 +5521,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
goto err;
}
if ((s->mb_height >> v->field_mode) == 0) {
av_log(v->s.avctx, AV_LOG_ERROR, "image too short\n");
goto err;
}
// process pulldown flags
s->current_picture_ptr->f.repeat_pict = 0;
// Pulldown flags are only valid when 'broadcast' has been set.