readdir_r/pathconf race condition.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4000
Reported by Ben Hutchings, ben@decadentplace.org.uk
I need to report a potential security bug ahead of public disclosure. Please can this issue be marked as non-public before I add the details.