Commit 939ac41d authored by Rémi Duraffort's avatar Rémi Duraffort

lua_demux: fix a potential read of uninitialized value (thanks to JoungEunKim on the forum).

(cherry picked from commit 28ad9041)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 15a06013
...@@ -209,13 +209,9 @@ int Import_LuaPlaylist( vlc_object_t *p_this ) ...@@ -209,13 +209,9 @@ int Import_LuaPlaylist( vlc_object_t *p_this )
demux_t *p_demux = (demux_t *)p_this; demux_t *p_demux = (demux_t *)p_this;
int ret; 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 ) if( !p_demux->p_sys )
{
return VLC_ENOMEM; return VLC_ENOMEM;
}
p_demux->p_sys->psz_filename = NULL;
p_demux->pf_control = Control; p_demux->pf_control = Control;
p_demux->pf_demux = Demux; p_demux->pf_demux = Demux;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment