[vlc-devel] [PATCH] Possible buffer overflow in vlc_readdir (fixes #9676)

Steinar H. Gunderson sgunderson at bigfoot.com
Mon Jan 20 15:33:41 CET 2014


On Mon, Jan 20, 2014 at 11:15:06PM +0900, Iwao AVE! wrote:
> +#ifdef __APPLE__
> +    /*
> +     * The returned value is in characters instead of bytes.
> +     * Each character could occupy 4 bytes in UTF-8.
> +     */
> +    len *= 4;
> +#endif

A Unicode code point can occupy up to six bytes in UTF-8.

Assuming, of course, that they mean Unicode code points by “character”
in the first place, and not something more complicated.

/* Steinar */
-- 
Homepage: http://www.sesse.net/



More information about the vlc-devel mailing list