Commit 90eb56c8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Subtitles: avoid infinite loop

Close #6720
(cherry picked from commit 830c1cffef0b503f079ca9bbf93d86a58a9f926d)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent d7239098
...@@ -708,12 +708,17 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle ) ...@@ -708,12 +708,17 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
if( psz_subtitle[i_len] == '\"' ) if( psz_subtitle[i_len] == '\"' )
i_len++; i_len++;
} }
/* Not a tag, something else we do not understand */
if( i_len == 0 )
*psz_subtitle++;
psz_subtitle += i_len; psz_subtitle += i_len;
} }
while (*psz_subtitle == ' ') while (*psz_subtitle == ' ')
*psz_html++ = *psz_subtitle++; *psz_html++ = *psz_subtitle++;
} }
*psz_html++ = *psz_subtitle++; *psz_html++ = '>';
*psz_subtitle++;
} }
else if( !strncmp( psz_subtitle, "</", 2 )) else if( !strncmp( psz_subtitle, "</", 2 ))
{ {
......
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