Commit dc14617f authored by Harry Sintonen's avatar Harry Sintonen Committed by Jean-Baptiste Kempf

Handle early termination properly in StripTags

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 2b790c3e8cbc3dfb7e8709027b7bea358c6f18ba)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3aab6e14
......@@ -632,6 +632,9 @@ static char *StripTags( char *psz_subtitle )
*psz_text++ = *psz_subtitle;
}
/* Security fix: Account for the case where input ends early */
if( *psz_subtitle == '\0' ) break;
psz_subtitle++;
}
*psz_text = '\0';
......
......@@ -1081,6 +1081,9 @@ static char *StripTags( char *psz_subtitle )
*psz_text++ = *psz_subtitle;
}
/* Security fix: Account for the case where input ends early */
if( *psz_subtitle == '\0' ) break;
psz_subtitle++;
}
*psz_text = '\0';
......
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