[vlc-commits] codec: webvtt: check timestamp validity

Francois Cartegnie git at videolan.org
Wed Dec 13 19:29:26 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Dec 13 18:33:23 2017 +0100| [283178771b7dd7c7aed2884fd9ae514ea0175759] | committer: Francois Cartegnie

codec: webvtt: check timestamp validity

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=283178771b7dd7c7aed2884fd9ae514ea0175759
---

 modules/codec/webvtt/webvtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/webvtt/webvtt.c b/modules/codec/webvtt/webvtt.c
index 8172c1cf1c..cc3aeca575 100644
--- a/modules/codec/webvtt/webvtt.c
+++ b/modules/codec/webvtt/webvtt.c
@@ -240,7 +240,7 @@ void webvtt_text_parser_Feed( webvtt_text_parser_t *p, char *psz_line )
             mtime_t i_start, i_stop;
 
             if( webvtt_scan_time( p->reads[1], &i_start ) &&
-                webvtt_scan_time( psz_split + 5,  &i_stop ) )
+                webvtt_scan_time( psz_split + 5,  &i_stop ) && i_start <= i_stop )
             {
                 const char *psz_attrs = strchr( psz_split + 5 + 9, ' ' );
                 p->p_cue = ( p->pf_get_cue ) ? p->pf_get_cue( p->priv ) : NULL;



More information about the vlc-commits mailing list