add_string( "subsdec-encoding", "",
ENCODING_TEXT, ENCODING_LONGTEXT, false )
change_string_list( ppsz_encodings, ppsz_encoding_names, 0 )
- add_bool( "subsdec-autodetect-utf8", true, NULL,
+ add_bool( "subsdec-autodetect-utf8", true,
AUTODETECT_UTF8_TEXT, AUTODETECT_UTF8_LONGTEXT, false )
- add_bool( "subsdec-formatted", true, NULL, FORMAT_TEXT, FORMAT_LONGTEXT,
+ add_bool( "subsdec-formatted", true, FORMAT_TEXT, FORMAT_LONGTEXT,
false )
vlc_module_end ()
*psz_text++ = *psz_subtitle;
}
+ /* Security fix: Account for the case where input ends early */
+ if( *psz_subtitle == '\0' ) break;
+
psz_subtitle++;
}
*psz_text = '\0';
/* Hide {\stupidity} */
psz_subtitle = strchr( psz_subtitle, '}' ) + 1;
}
- else if( psz_subtitle[0] == '{' && psz_subtitle[1] == 'Y'
+ else if( psz_subtitle[0] == '{' && ( psz_subtitle[1] == 'Y' || psz_subtitle[1] == 'y' )
&& psz_subtitle[2] == ':' && strchr( psz_subtitle, '}' ) )
{
/* Hide {Y:stupidity} */