Commit 958cd036 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

subsdec: NULL dereference (fix #4125)

parent 87200ffb
......@@ -284,7 +284,7 @@ static int OpenDecoder( vlc_object_t *p_this )
psz_charset = var_InheritString (p_dec, "subsdec-encoding");
msg_Dbg (p_dec, "trying configured character encoding: %s",
psz_charset ? psz_charset : "not specified");
if (!strcmp (psz_charset, "system"))
if (psz_charset != NULL && !strcmp (psz_charset, "system"))
free (psz_charset);
psz_charset = strdup ("");
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