From: "Ronald S. Bultje" <[email protected]>

Seeking backwards after a 1-byte read will result in an infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
---
 libavformat/asfdec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 01411fa..818f82d 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -761,8 +761,8 @@ static int ff_asf_get_packet(AVFormatContext *s, 
AVIOContext *pb)
         c= avio_r8(pb);
         d= avio_r8(pb);
         rsize+=3;
-    }else{
-        avio_seek(pb, -1, SEEK_CUR); //FIXME
+    } else {
+        av_log(s, AV_LOG_ERROR, "Invalid sync state 0x%x\n", c);
     }
 
     asf->packet_flags    = c;
-- 
1.7.7.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to