提交 9db67bed 编写于 作者: M Michael Niedermayer 提交者: Luca Barbato

mov: detect EOF in mov_read_dref()

Avoid a near infinite loop.
Issue discovered by cosminamironesei.
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 4ed5ac50
......@@ -416,6 +416,8 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_skip(pb, 16);
for (type = 0; type != -1 && avio_tell(pb) < next; ) {
if (pb->eof_reached)
return AVERROR_EOF;
type = avio_rb16(pb);
len = avio_rb16(pb);
av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册