Commit d65ef91e authored by Derk-Jan Hartman's avatar Derk-Jan Hartman Committed by Jean-Baptiste Kempf

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.
(cherry picked from commit f77a6c48)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b0193c5b
......@@ -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