[MPlayer-dev-eng] [PATCH] Filename double-conversion

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 16 11:42:37 CET 2006


Hello,
On Thu, Nov 16, 2006 at 04:29:58PM +0800, Zuxy Meng wrote:
> +const char* filename_recode(const char* filename)
> +{
> +#if !defined(USE_ICONV) || !defined(MSG_CHARSET)
> +    return filename;
> +#else
> +    static iconv_t inv_msgiconv = (iconv_t)(-1);
> +    static char recoded_filename[PATH_MAX];

On linux this is a full 4k, and I could easily expect that some systems
might not have any limit at all, but at least one much larger.
I would vote towards restricting this to something more like 512 bytes,
and maybe just adding '...' if it was not possible to convert it fully
(i.e. filename_len != 0 after iconv). Well, I admit I'm not 100% certain this
part is desirable.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list