Fix reading ASX playlist when its size is unknown
authorPrzemyslaw Fiala <bl4@playker.info>
Sun, 6 Jul 2008 20:39:24 +0000 (22:39 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 7 Jul 2008 08:29:35 +0000 (10:29 +0200)
Signed-off-by: Antoine Cellerier <dionoea@videolan.org>
modules/demux/playlist/asx.c

index 49e1dc4..0af2d4c 100644 (file)
@@ -247,7 +247,7 @@ static int Demux( demux_t *p_demux )
         for( ;; )
         {
             int i_read = stream_Read( p_demux->s, &p_sys->psz_data[i_pos], p_sys->i_data_len - i_pos );
-            p_sys->psz_data[i_read] = '\0';
+            p_sys->psz_data[i_pos + i_read] = '\0';
 
             if( i_read < p_sys->i_data_len - i_pos ) break; /* Done */