[vlc-devel] commit: Fix infinite loop ( Rafaël Carré )
git version control
git at videolan.org
Mon Mar 31 15:25:19 CEST 2008
vlc | branch: 0.8.6-bugfix | Rafaël Carré <funman at videolan.org> | Sat Mar 29 06:31:02 2008 +0100| [96ac23c386cd845fdb5c984c814ad363854334f8]
Fix infinite loop
(cherry picked from commit e91f2120737a55ea877a5090c03628d370b52090)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96ac23c386cd845fdb5c984c814ad363854334f8
---
modules/codec/ffmpeg/demux.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/codec/ffmpeg/demux.c b/modules/codec/ffmpeg/demux.c
index 95d2460..9b18a23 100644
--- a/modules/codec/ffmpeg/demux.c
+++ b/modules/codec/ffmpeg/demux.c
@@ -489,8 +489,13 @@ static offset_t IOSeek( void *opaque, offset_t offset, int whence )
}
if( i_absolute < 0 )
i_absolute = 0;
- if( i_size && i_absolute > i_size )
- i_absolute = i_size;
+ if( i_size )
+ {
+ if( i_absolute > i_size )
+ i_absolute = i_size;
+ if( stream_Tell( p_demux->s ) >= i_size )
+ return -1;
+ }
if( stream_Seek( p_demux->s, i_absolute ) )
{
More information about the vlc-devel
mailing list