ffmpeg | branch: master | Alexandra Hájková <alexandra.khirn...@gmail.com> | 
Thu Jul  2 14:17:20 2015 +0200| [016cac75c6061a1c03f812ddf258b8baefe70b00] | 
committer: Luca Barbato

asfdec: prevent the infinite loop in detect unknown_subobject

Signed-off-by: Luca Barbato <lu_z...@gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=016cac75c6061a1c03f812ddf258b8baefe70b00
---

 libavformat/asfdec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index f2dd489..9989b80 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to