[Ffmpeg-cvslog] r7539 - trunk/libavformat/asf.c

michael subversion
Tue Jan 16 00:47:53 CET 2007


Author: michael
Date: Tue Jan 16 00:47:53 2007
New Revision: 7539

Modified:
   trunk/libavformat/asf.c

Log:
fix segfault with http://sam.zoy.org/zzuf/lol-ffplay.wmv


Modified: trunk/libavformat/asf.c
==============================================================================
--- trunk/libavformat/asf.c	(original)
+++ trunk/libavformat/asf.c	Tue Jan 16 00:47:53 2007
@@ -601,6 +601,10 @@
                 assert(asf->packet_replic_size >= 8);
                 // it should be always at least 8 bytes - FIXME validate
                 asf->packet_obj_size = get_le32(pb);
+                if(asf->packet_obj_size >= (1<<24) || asf->packet_obj_size <= 0){
+                    av_log(s, AV_LOG_ERROR, "packet_obj_size invalid\n");
+                    continue;
+                }
                 asf->packet_frag_timestamp = get_le32(pb); // timestamp
                 if (asf->packet_replic_size > 8)
                     url_fskip(pb, asf->packet_replic_size - 8);




More information about the ffmpeg-cvslog mailing list