[vlc-commits] rtp out: prevent zero-sized array

Rémi Denis-Courmont git at videolan.org
Wed Apr 13 21:16:31 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 13 22:16:10 2016 +0300| [2f5c9c16f81ba7a88781b907a3deb1724e2bcb0a] | committer: Rémi Denis-Courmont

rtp out: prevent zero-sized array

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

 modules/stream_out/rtp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 0fd1fdb..3f85f2e 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1444,7 +1444,7 @@ static void* ThreadSend( void *data )
 
         vlc_mutex_lock( &id->lock_sink );
         unsigned deadc = 0; /* How many dead sockets? */
-        int deadv[id->sinkc]; /* Dead sockets list */
+        int deadv[id->sinkc ? id->sinkc : 1]; /* Dead sockets list */
 
         for( int i = 0; i < id->sinkc; i++ )
         {



More information about the vlc-commits mailing list