[vlc-devel] [PATCH] stream: Fix segfault caused by invalid seek

Rafaël Carré funman at videolan.org
Wed Feb 6 00:02:10 CET 2013


Sample can be found on https://www.dropbox.com/s/cd56gjk4ablimp5/A_lawnmower.wmv
---
 src/input/stream.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 0598a30..e75618f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1260,7 +1260,7 @@ static int AStreamSeekStream( stream_t *s, uint64_t i_pos )
         if( p_sys->stream.i_used < STREAM_READ_ATONCE / 2 )
             p_sys->stream.i_used = STREAM_READ_ATONCE / 2;
 
-        if( AStreamRefillStream( s ) && i_pos == tk->i_end )
+        if( AStreamRefillStream( s ) && i_pos >= tk->i_end )
             return VLC_EGENERIC;
     }
     return VLC_SUCCESS;
-- 
1.7.10.4



More information about the vlc-devel mailing list