[vlc-commits] ttml demux: Fix read of uninitialized pointer

Hugo Beauzée-Luyssen git at videolan.org
Thu Sep 15 13:16:21 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Sep 15 11:57:48 2016 +0200| [cf9805bfbf09fcd023ce7a7cb708d009661d4a2f] | committer: Hugo Beauzée-Luyssen

ttml demux: Fix read of uninitialized pointer

Introduced in 4ed089f8
Fix cid #1372955

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

 modules/demux/ttml.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index e8346a3..c91c62e 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -427,8 +427,8 @@ static int ParseTimeOnSpan( demux_sys_t* p_sys, char* psz_text )
     * spans inside, and will store every span text and times
     * inside a subtitle_t structure.
     */
-    for( int i_type = XML_READER_STARTELEM;
-         i_type != XML_READER_ENDELEM || CompareTagName( psz_node_name, "p" );
+    int i_type = xml_ReaderNextNode( p_reader, &psz_node_name );
+    for( ; i_type != XML_READER_ENDELEM || CompareTagName( psz_node_name, "p" );
          i_type = xml_ReaderNextNode( p_reader, &psz_node_name ) )
     {
         if( i_type == XML_READER_STARTELEM && !strcasecmp( psz_node_name, "metadata" ) )



More information about the vlc-commits mailing list