Commit 62006b53 authored by Michael Niedermayer's avatar Michael Niedermayer

ituh263dec: more complete w/h check.

Fixes a division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent caa2fa2c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment