[vlc-commits] ttml demux: add null character to psz_head string

Stanislas Plessia git at videolan.org
Wed Sep 14 18:39:43 CEST 2016


vlc | branch: master | Stanislas Plessia <stplessia at gmail.com> | Mon Aug 29 16:01:00 2016 +0200| [efcfd80636fe620cc1a403e4ef433bf9a8e7e6dc] | committer: Hugo Beauzée-Luyssen

ttml demux: add null character to psz_head string

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

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

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 5c3e610..6394cb1 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -606,6 +606,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;



More information about the vlc-commits mailing list