[vlc-commits] subtitle: Fix potential heap buffer overflow
Hugo Beauzée-Luyssen
git at videolan.org
Thu May 18 16:11:24 CEST 2017
vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 28 13:56:46 2017 +0200| [9575163c9093b439403d1b2551f2c01f4081ebb4] | committer: Hugo Beauzée-Luyssen
subtitle: Fix potential heap buffer overflow
Reported-by: Yannay Livneh <yannayl at checkpoint.com>
Omri Herscovici <omrih at checkpoint.com>
Omer Gull <omergu at checkpoint.com>
(cherry picked from commit f2b1f9e3538fc30ecc22b90bcb4300f68d703d30)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=9575163c9093b439403d1b2551f2c01f4081ebb4
---
modules/demux/subtitle.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 05c69884ac..3e40f28065 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -1886,8 +1886,8 @@ static int ParseJSS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
if( (*(psz_text + 1 ) ) == '~' || (*(psz_text + 1 ) ) == '{' ||
(*(psz_text + 1 ) ) == '\\' )
psz_text++;
- else if( *(psz_text + 1 ) == '\r' || *(psz_text + 1 ) == '\n' ||
- *(psz_text + 1 ) == '\0' )
+ else if( ( *(psz_text + 1 ) == '\r' || *(psz_text + 1 ) == '\n' ) &&
+ *(psz_text + 1 ) != '\0' )
{
psz_text++;
}
More information about the vlc-commits
mailing list