[libfuzzer] Fallback to stat if d_type == DT_UNKNOWN in ListFilesInDirRecursive method

Hi All,

Currently libfuzzer doesn’t properly handles case when readdir returns dirent structure with d_type == DT_UNKNOWN in ListFilesInDirRecursive method: . It just skips corpus data and fuzzing starts in a clean slate.

Man pages of readdir says there should be fallback to the lstat/stat in this case:

Patch attached.

patch.diff (737 Bytes)

Hi Aleksander,

Thanks for the patch!