[vlc-devel] [PATCH] Demux/Playlist: If an URI contains whitespaces, it will now be encoded to %20. Fixes #2924.
sith_dev at gmx.eu
Sun Jan 1 23:08:04 CET 2012
Am 01.01.2012 19:03, schrieb Francois Cartegnie:
> Le 01/01/2012 17:37, Thomas Siegbert a écrit :
>> + * Encode only the white spaces within an URI according to RFC3986.
>> + */
> If it's according to 3986, it can't only be targeting spaces.
You are right. The coding just a subset of 3986... I will remove this
part of my comment.
>> + char *psz_result = malloc( strlen( psz_uri ) * 3 + 1 ), *psz_buf = psz_result;
> I think we can accept O(2n) instead of using 3x storage in the worst case.
That was also my first idea. But is there a problem with buffer overflow?
>> + return strdup( demux_encodeUriSpaces( psz_mrl ) );
Oh, thank you very much. I have to keep such things in mind. I will fix it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3871 bytes
Desc: S/MIME Kryptografische Unterschrift
More information about the vlc-devel