[vlc-commits] stream_demux: fix crash on stream_Seek()

Francois Cartegnie git at videolan.org
Thu Dec 18 22:39:59 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 18 21:19:33 2014 +0100| [b397e42f30fbfdec64d27411ab4f0a853274de91] | committer: Francois Cartegnie

stream_demux: fix crash on stream_Seek()

tried to increment NULL

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b397e42f30fbfdec64d27411ab4f0a853274de91
---

 src/input/stream_demux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/stream_demux.c b/src/input/stream_demux.c
index 3516d79..9bf3343 100644
--- a/src/input/stream_demux.c
+++ b/src/input/stream_demux.c
@@ -200,7 +200,7 @@ static int DStreamRead( stream_t *s, void *p_read, unsigned int i_read )
             i_copy = __MIN( i_read, p_block->i_buffer );
             if( p_out && i_copy ) memcpy( p_out, p_block->p_buffer, i_copy );
             i_read -= i_copy;
-            p_out += i_copy;
+            if ( p_out ) p_out += i_copy;
             i_out += i_copy;
             p_block->i_buffer -= i_copy;
             p_block->p_buffer += i_copy;



More information about the vlc-commits mailing list