-
Bug
-
Resolution: Won't Fix
-
P5
-
None
-
None
-
None
A better way would be to just rely on pathconf():
- if pathconf() returns an error, return an error as well
- Otherwise use the length pathconf() returned, but use a canary at the end of the buffer to check for buffer overflows.
The latter point is important because readdir_r in combination with pathconf is unsafe, see e.g. https://womble.decadent.org.uk/readdir_r-advisory.html
- relates to
-
JDK-8202794 Native Unix code should use readdir rather than readdir_r
-
- Closed
-
-
JDK-8202353 os::readdir should use readdir instead of readdir_r
-
- Resolved
-