ObjFW  Check-in [c615b62ed8]

Overview
Comment: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.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c615b62ed8dfcdb37ded7c7a8b2c63d17f71c4f3f4f44850b08394fbd6e645d0
User & Date: js on 2024-04-16 23:50:40
Other Links: manifest | tags
Context
2024-04-17
20:45
forwarding: Don't grow the stack twice on ARM64 check-in: 8e95cb1c77 user: js tags: trunk
2024-04-16
23:50
Don't use readdir_r check-in: c615b62ed8 user: js tags: trunk
23:18
lookup-asm-arm64-elf.S: Save one instruction check-in: 460b84b9b2 user: js tags: trunk
Changes