3 ms·
One of our devs also found that getdirentries returns a bogus too-large value when given a buffer much larger than needed to store the actual data on return, an
by coldpie 10y ago
One of our devs also found that getdirentries returns a bogus too-large value when given a buffer much larger than needed to store the actual data on return, and fills the remainder of the buffer with 0. This caused an infinite loop in our code, as we continually processed empty strings. This behavior is new in 10.12.
- gre 10y agogetdirentries() is deprecated as of 10.6 because it doesn't work with 64-bit inodes, according to the man page. The manpage recommends using readdir().