[vlc-commits] dbus: avoid invalid zero-size array

Rémi Denis-Courmont git at videolan.org
Wed Aug 20 19:58:25 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 20 20:58:16 2014 +0300| [e2da5c14f68863b708f228510aaa4be05bccd0a2] | committer: Rémi Denis-Courmont

dbus: avoid invalid zero-size array

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

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

diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index 6d14067..31733e0 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -833,7 +833,7 @@ static void *Run( void *data )
 
         /* Get the list of watches to process */
         i_watches = vlc_array_count( p_sys->p_watches );
-        DBusWatch *p_watches[i_watches];
+        DBusWatch *p_watches[i_watches ? i_watches : 1];
         for( int i = 0; i < i_watches; i++ )
         {
             p_watches[i] = vlc_array_item_at_index( p_sys->p_watches, i );



More information about the vlc-commits mailing list