vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Sun Apr 29 22:44:28 2012 +0200| [830c1cffef0b503f079ca9bbf93d86a58a9f926d] | committer: Jean-Baptiste Kempf
Subtitles: avoid infinite loop Close #6720 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=830c1cffef0b503f079ca9bbf93d86a58a9f926d --- modules/codec/subsdec.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c index a69bcf0..1a6d74d 100644 --- a/modules/codec/subsdec.c +++ b/modules/codec/subsdec.c @@ -695,12 +695,17 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle ) if( psz_subtitle[i_len] == '\"' ) i_len++; } + /* Not a tag, something else we do not understand */ + if( i_len == 0 ) + *psz_subtitle++; + psz_subtitle += i_len; } while (*psz_subtitle == ' ') *psz_html++ = *psz_subtitle++; } - *psz_html++ = *psz_subtitle++; + *psz_html++ = '>'; + *psz_subtitle++; } else if( !strncmp( psz_subtitle, "</", 2 )) { _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
