提交 628c9dcc 编写于 作者: M Michael Niedermayer

j2kdec: fix division by zero, check tile dimensions for validity

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 58c41799
......@@ -220,6 +220,9 @@ static int get_siz(J2kDecoderContext *s)
s->tile_offset_y = bytestream_get_be32(&s->buf); // YT0Siz
s->ncomponents = bytestream_get_be16(&s->buf); // CSiz
if(s->tile_width<=0 || s->tile_height<=0)
return AVERROR(EINVAL);
if (s->buf_end - s->buf < 2 * s->ncomponents)
return AVERROR(EINVAL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册