From 28ad9041168d7e09b58705ad1f885b068b014208 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Sun, 26 Sep 2010 11:32:18 +0200 Subject: [PATCH] lua_demux: fix a potential read of uninitialized value (thanks to JoungEunKim on the forum). --- modules/misc/lua/demux.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/misc/lua/demux.c b/modules/misc/lua/demux.c index 3fe1ef72eb..f924512a3d 100644 --- a/modules/misc/lua/demux.c +++ b/modules/misc/lua/demux.c @@ -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; -- 2.39.2