Commit 12c11c31 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input: fix check for unnamed attachment, potential read overflow

Pointed-out-by: <hugh1234@mail.ustc.edu.cn>
parent 502e723f
......@@ -1004,7 +1004,7 @@ static void LoadSubtitles( input_thread_t *p_input )
if( !a )
continue;
char *psz_mrl;
if( a->psz_name[i] &&
if( a->psz_name[0] &&
asprintf( &psz_mrl, "attachment://%s", a->psz_name ) >= 0 )
{
var_SetString( p_input, "sub-description", a->psz_description ? a->psz_description : "");
......
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