[vlc-devel] [vlc-commits] demux: mp4: handle in sample text encoding (fix #11137)

Francois Cartegnie fcvlcdev at free.fr
Thu Apr 3 20:20:33 CEST 2014


>> -    p_buf += i_psz_length + sizeof(uint16_t);
>> +    memcpy( psz_subtitle, p_pszstart, i_psz_bytelength );
> 
> As pointed out on IRC, this makes no sense, not to mention that it will 
> overflow the heap on ASCII characters.
> 
>> +    psz_subtitle[ i_psz_bytelength ] = '\0';
> 
> FromCharset() already nul-terminates. But this code makes no sense anyway.
> 

*damn*

Obviously missing braces, that code is only related to prev version/else
part.

Francois



More information about the vlc-devel mailing list