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

ituh263dec: more complete w/h check.

Fixes a 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-15 02:43:38 +01:00
parent caa2fa2c69
commit 62006b539d

View File

@ -1075,6 +1075,10 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
s->qscale = get_bits(&s->gb, 5);
}
if (s->width == 0 || s->height == 0) {
av_log(s->avctx, AV_LOG_ERROR, "dimensions 0\n");
return -1;
}
s->mb_width = (s->width + 15) / 16;
s->mb_height = (s->height + 15) / 16;
s->mb_num = s->mb_width * s->mb_height;