]> git.sesse.net Git - vlc/commitdiff
Fixed infinite loop in truncated file.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 2 Jul 2008 16:55:51 +0000 (16:55 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 2 Jul 2008 19:57:30 +0000 (19:57 +0000)
modules/demux/asf/asf.c

index b23c78a85f1d5820b70eaf4fbe1d7236006a5f1a..03e1f8f30f71865617ae4076c771df035a5904f8 100644 (file)
@@ -654,7 +654,11 @@ loop_error_recovery:
         msg_Err( p_demux, "unsupported packet header, fatal error" );
         return -1;
     }
-    stream_Read( p_demux->s, NULL, i_data_packet_min );
+    if( stream_Read( p_demux->s, NULL, i_data_packet_min ) != i_data_packet_min )
+    {
+        msg_Warn( p_demux, "cannot skip data, EOF ?" );
+        return 0;
+    }
 
     return 1;
 }