[vlc-devel] [PATCH 02/19] ttml demux: add null character to psz_head string

Stanislas Plessia stplessia at gmail.com
Mon Aug 29 16:01:00 CEST 2016


---
 modules/demux/ttml.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index e51ef35..e0a81ff 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -608,6 +608,7 @@ static void ParseHead( demux_t* p_demux )
                     // Though if we already have the </head> in our buffer, we need to adjust the total size
                     i_head_len = psz_end_head - buff + i_end_tag_len + i_offset;
                 }
+                psz_head[i_head_len] = 0;
                 p_sys->psz_head = psz_head;
                 p_sys->i_head_len = i_head_len;
                 break;
-- 
2.7.4



More information about the vlc-devel mailing list