summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-07-02 14:17:20 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-07-03 01:50:09 +0200
commit016cac75c6061a1c03f812ddf258b8baefe70b00 (patch)
treec98160a0acd2152824ceb92c064f6d5962e39308 /libavformat/asfdec.c
parent9752d2e6cc9b9e8070ec515db8ed8374683d0856 (diff)
asfdec: prevent the infinite loop in detect unknown_subobject
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index f2dd489b99..9989b8073c 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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;