This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nonstrings in Glibc


On 11/21/2017 11:31 PM, Andreas Schwab wrote:
On Nov 21 2017, Zack Weinberg <zackw@panix.com> wrote:

If POSIX requires d_name to be nul-terminated,

"The array d_name is of unspecified size, but shall contain a filename
of at most {NAME_MAX} bytes followed by a terminating null byte."

Our definition of NAME_MAX is not large enough on Linux. I suspect the actual kernel limit is around a page size or something like that.

We could start to enforce that, but then you won't be able to access some files on NTFS or SMB file systems anymore. They have a 255 character limit, too, but as it's measured in UTF-16 wide characters, and we use UTF-8 for file name encoding, 255 bytes aren't sufficient to store all names.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]