Commit bf50607a authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato

asfdec: check for too small size in asf_read_unknown

This fixes infinite loops due to seeking back.
Signed-off-by: 's avatarAlexandra Hájková <alexandra@khirnov.net>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent e4d1621c
......@@ -190,8 +190,13 @@ static int asf_read_unknown(AVFormatContext *s, const GUIDParseTable *g)
if ((ret = detect_unknown_subobject(s, asf->unknown_offset,
asf->unknown_size)) < 0)
return ret;
} else
} else {
if (size < 24) {
av_log(s, AV_LOG_ERROR, "Too small size %"PRIu64" (< 24).\n", size);
return AVERROR_INVALIDDATA;
}
avio_skip(pb, size - 24);
}
return 0;
}
......
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