[vlc-devel] commit: subass: Fix crash in the simple SSA/ASS decoder. (Derk-Jan Hartman )
git version control
git at videolan.org
Wed Sep 17 02:03:59 CEST 2008
vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 16 15:06:22 2008 +0200| [d65ef91e979ea9ffb87a923adf49e8bc0a12560a] | committer: 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 f77a6c4896c2de08d05effa9aad23d3c82005d31)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d65ef91e979ea9ffb87a923adf49e8bc0a12560a
---
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 3725002..ebb5b6f 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