[vlc-devel] commit: subass: Fix crash in the simple SSA/ASS decoder. (Derk-Jan Hartman )
git version control
git at videolan.org
Tue Sep 16 15:06:55 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 16 15:06:22 2008 +0200| [f77a6c4896c2de08d05effa9aad23d3c82005d31] | committer: Derk-Jan 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f77a6c4896c2de08d05effa9aad23d3c82005d31
---
modules/codec/subtitles/subsass.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/codec/subtitles/subsass.c b/modules/codec/subtitles/subsass.c
index 1706c9c..e642673 100644
--- a/modules/codec/subtitles/subsass.c
+++ b/modules/codec/subtitles/subsass.c
@@ -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
{
More information about the vlc-devel
mailing list