vlc/vlc-2.2 | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Fri Apr 28 13:56:46 2017 +0200| [9575163c9093b439403d1b2551f2c01f4081ebb4] | committer: Hugo Beauzée-Luyssen
subtitle: Fix potential heap buffer overflow Reported-by: Yannay Livneh <[email protected]> Omri Herscovici <[email protected]> Omer Gull <[email protected]> (cherry picked from commit f2b1f9e3538fc30ecc22b90bcb4300f68d703d30) Signed-off-by: Hugo Beauzée-Luyssen <[email protected]> > 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++; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
