Commit f77a6c48 authored by hartman's avatar hartman

subass: Fix crash in the simple SSA/ASS decoder.

This is the issue exploited by the anime groups.
We now skip anything in { }
Note that ass/ssa cannot have a valid string with text { text } text.
parent cc59dc90
......@@ -93,16 +93,15 @@ void ParseSSAString( decoder_t *p_dec,
i_text++;
psz_buffer_sub += 2;
}
else if( psz_buffer_sub[0] == '{' &&
psz_buffer_sub[1] == '\\' )
else if( psz_buffer_sub[0] == '{' )
{
/* SSA control code */
/* { } Control code in SSA. Cannot be escaped */
while( psz_buffer_sub[0] != '\0' &&
psz_buffer_sub[0] != '}' )
{
psz_buffer_sub++;
}
psz_buffer_sub++;
if( psz_buffer_sub[0] == '}' ) psz_buffer_sub++;
}
else
{
......
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