Commit a90a8151 authored by Rémi Duraffort's avatar Rémi Duraffort

DynamicOverlay: fix crash (invalid free).

The string given in a callback must be copied.
(cherry picked from commit 1446509e)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent f34dc04a
......@@ -387,9 +387,15 @@ static int AdjustCallback( vlc_object_t *p_this, char const *psz_var,
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
if( !strncmp( psz_var, "overlay-input", 13 ) )
p_sys->psz_inputfile = newval.psz_string;
{
free( p_sys->psz_inputfile );
p_sys->psz_inputfile = strdup( newval.psz_string );
}
else if( !strncmp( psz_var, "overlay-output", 14 ) )
p_sys->psz_outputfile = newval.psz_string;
{
free( p_sys->psz_outputfile );
p_sys->psz_outputfile = strdup( newval.psz_string );
}
return VLC_EGENERIC;
}
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