In one place snapper calls fpathconf(.., _PC_NAME_MAX) to determine the size of
a buffer used to hold readdir_r() results. fpathconf() may return -1 on error,
but this fpathconf() call's return value is unchecked. This can result in
allocating a buffer that is too small for readdir_r()'s results, resulting in
out-of-bounds memory access.
Fix it by falling back to using NAME_MAX if fpathconf(.., _PC_NAME_MAX) fails.