[vlc-commits] subsdec: Fix potential out of bound read
Hugo Beauzée-Luyssen
git at videolan.org
Fri Apr 7 11:57:28 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr 7 11:55:30 2017 +0200| [ecd3173375fedcbaa9d538b240f8e90be625be56] | committer: Hugo Beauzée-Luyssen
subsdec: Fix potential out of bound read
Reported-by: Yannay Livneh <yannayl at checkpoint.com>
Omri Herscovici <omrih at checkpoint.com>
Omer Gull <omergu at checkpoint.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecd3173375fedcbaa9d538b240f8e90be625be56
---
modules/codec/subsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 994a208..57657ec 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -939,7 +939,7 @@ static text_segment_t* ParseSubtitles( int *pi_align, const char *psz_subtitle )
* - We don't support the DEFAULT flag (HEADER)
*/
- else if( psz_subtitle[0] == '{' &&
+ else if( psz_subtitle[0] == '{' && psz_subtitle[1] != 0 &&
psz_subtitle[2] == ':' && strchr( &psz_subtitle[2], '}' ) )
{
const char *psz_tag_end = strchr( &psz_subtitle[2], '}' );
More information about the vlc-commits
mailing list