]> git.sesse.net Git - vlc/commitdiff
lua_demux: fix a potential read of uninitialized value (thanks to JoungEunKim on...
authorRémi Duraffort <ivoire@videolan.org>
Sun, 26 Sep 2010 09:32:18 +0000 (11:32 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 26 Sep 2010 09:32:18 +0000 (11:32 +0200)
modules/misc/lua/demux.c

index 3fe1ef72eb755d82d4ad8eef79fc8c0fd982b3d8..f924512a3d62cd16264ce0c548130320c053e0b6 100644 (file)
@@ -209,13 +209,9 @@ int Import_LuaPlaylist( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     int ret;
 
-    p_demux->p_sys = (demux_sys_t*)malloc( sizeof( demux_sys_t ) );
+    p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) );
     if( !p_demux->p_sys )
-    {
         return VLC_ENOMEM;
-    }
-
-    p_demux->p_sys->psz_filename = NULL;
 
     p_demux->pf_control = Control;
     p_demux->pf_demux = Demux;