[vlc-devel] commit: Fixed infinite loop in truncated file. (Laurent Aimar )
git version control
git at videolan.org
Wed Jul 2 21:55:42 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jul 2 16:55:51 2008 +0000| [ccb8128c8e6d6982f4b89636b599f2332e6b5fb6]
Fixed infinite loop in truncated file.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ccb8128c8e6d6982f4b89636b599f2332e6b5fb6
---
modules/demux/asf/asf.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index b23c78a..03e1f8f 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -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;
}
More information about the vlc-devel
mailing list