Commit 1446509e authored by ivoire's avatar ivoire
Browse files

DynamicOverlay: fix crash (invalid free).

The string given in a callback must be copied.
parent 9c4e67cf
...@@ -385,9 +385,15 @@ static int AdjustCallback( vlc_object_t *p_this, char const *psz_var, ...@@ -385,9 +385,15 @@ static int AdjustCallback( vlc_object_t *p_this, char const *psz_var,
VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(p_this); VLC_UNUSED(oldval);
if( !strncmp( psz_var, "overlay-input", 13 ) ) 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 ) ) 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; 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