[FFmpeg-cvslog] asfdec: prevent the infinite loop in detect unknown_subobject
Alexandra Hájková
git at videolan.org
Fri Jul 3 04:05:56 CEST 2015
ffmpeg | branch: master | Alexandra Hájková <alexandra.khirnova at 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_zero at 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;
More information about the ffmpeg-cvslog
mailing list