aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-02-28 16:13:46 -0800
committerReinhard Tartler <siretart@tauware.de>2012-02-29 14:22:35 +0100
commit40ccc811461c2c5f7999200315f9e2a563807147 (patch)
tree9dd3439ea22df7d7c2a011c733e2334108d22042
parent1c63d613721f9fb05dcf1646d00aabf5f63695eb (diff)
downloadffmpeg-40ccc811461c2c5f7999200315f9e2a563807147.tar.gz
asf: don't seek back on EOF.
Seeking back on EOF will reset the EOF flag, causing us to re-enter the loop to find the next marker in the ASF file, thus potentially causing an infinite loop. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org (cherry picked from commit bb6d5411e1e1a8e0608b1af1c4addee654dcbac5) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavformat/asfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 1fbe79bf5f..969ab28875 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -761,7 +761,7 @@ static int ff_asf_get_packet(AVFormatContext *s, AVIOContext *pb)
c= avio_r8(pb);
d= avio_r8(pb);
rsize+=3;
- }else{
+ } else if (!pb->eof_reached) {
avio_seek(pb, -1, SEEK_CUR); //FIXME
}