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

Francois Cartegnie fcvlcdev at free.fr
Tue Aug 30 13:08:30 CEST 2016


Le 29/08/2016 à 23:01, Stanislas Plessia a écrit :
> ---
>  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;
> 

Shouldn't need if you store size.

Francois


More information about the vlc-devel mailing list