Artifact d9639e50f4f59ad9581963f8b180b7bd9fa7c384127ef79b40ee8f70f4d1fdf4:
- File
src/OFFileIRIHandler.m
— part of check-in
[c615b62ed8]
at
2024-04-16 23:50:40
on branch trunk
— Don't use readdir_r
readdir_r can easily lead to stack overflows if the path is longer than
the space reserved for d_name in dirent. While some OSes use a length of
MAXNAMLEN + 1, others use just 1. This could be worked around by always
allocating a buffer of sizeof(struct dirent) + MAXNAMLEN (which would
work only in case MAXNAMLEN is actually the longest readdir_r can
return), but is probably not worth the risk, especially as glibc has
entirely deprecated readdir_r and it is expected to be removed from
POSIX. (user: js, size: 50258) [annotate] [blame] [check-ins using] [more...]
A hex dump of this file is not available. Please download the raw binary file and generate a hex dump yourself.