[vlc-devel] [PATCH] Demux/Playlist: If an URI contains whitespaces, it will now be encoded to %20. Fixes #2924.

Francois Cartegnie fcvlcdev at free.fr
Sun Jan 1 19:03:14 CET 2012


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.

> +    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.


> +        return strdup( demux_encodeUriSpaces( psz_mrl ) );

leak

Francois



More information about the vlc-devel mailing list