asfdec: prevent the infinite loop in detect unknown_subobject

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Alexandra Hájková 2015-07-02 14:17:20 +02:00 committed by Luca Barbato
parent 9752d2e6cc
commit 016cac75c6
1 changed files with 2 additions and 0 deletions

View File

@ -1591,6 +1591,8 @@ static int detect_unknown_subobject(AVFormatContext *s, int64_t offset, int64_t
int ret;
while (avio_tell(pb) <= offset + size) {
if (avio_tell(pb) == asf->offset)
break;
asf->offset = avio_tell(pb);
if ((ret = ff_get_guid(pb, &guid)) < 0)
return ret;