[vlc-devel] [PATCH] Demux/Playlist: If an URI contains whitespaces, it will now be encoded to %20. Fixes #2924.
Thomas Siegbert
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 ) );
>
> leak
Oh, thank you very much. I have to keep such things in mind. I will fix it.
- Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3871 bytes
Desc: S/MIME Kryptografische Unterschrift
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120101/cd6373c2/attachment.bin>
More information about the vlc-devel
mailing list