提交 3eedf9f7 编写于 作者: M Michael Niedermayer

j2kdec: Check curtileno for validity

Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 3132999f
......@@ -427,6 +427,10 @@ static uint8_t get_sot(J2kDecoderContext *s)
return AVERROR(EINVAL);
s->curtileno = bytestream_get_be16(&s->buf); ///< Isot
if((unsigned)s->curtileno >= s->numXtiles * s->numYtiles){
s->curtileno=0;
return AVERROR(EINVAL);
}
s->buf += 4; ///< Psot (ignored)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册