diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-28 16:13:46 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-28 16:25:05 -0800 |
commit | bb6d5411e1e1a8e0608b1af1c4addee654dcbac5 (patch) | |
tree | fe1e3a143d42523fa60480cef7f16ce20b0297ca /libavformat/asfdec.c | |
parent | 6e57a02b9f639af53acfa9fc742c1341400818f8 (diff) | |
download | ffmpeg-bb6d5411e1e1a8e0608b1af1c4addee654dcbac5.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
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 01411faf5a..8828eb583c 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 } |