summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <[email protected]>2012-02-28 16:13:46 -0800
committerReinhard Tartler <[email protected]>2012-04-01 18:33:27 +0200
commita2d5e741a889bfed621e18a94ff266d49d280557 (patch)
treed6fdc4f0b968081d67960b6cc5f8f082fa01f9d9
parent18caebca4c91605fd0a9f5bc339a63be9a6c977a (diff)
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: [email protected] (cherry picked from commit bb6d5411e1e1a8e0608b1af1c4addee654dcbac5) Signed-off-by: Reinhard Tartler <[email protected]>
-rw-r--r--libavformat/asfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 61721704d5..47d5b190c3 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
}