nonstrings in Glibc
Florian Weimer
fweimer@redhat.com
Tue Nov 21 22:39:00 GMT 2017
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
More information about the Libc-alpha
mailing list