readdir-rand: Copy full size of struct dirent
authorSimon McVittie <smcv@collabora.com>
Fri, 28 Oct 2022 11:21:29 +0000 (12:21 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 28 Oct 2022 11:21:58 +0000 (12:21 +0100)
commit3f3a817375f8fbfc965c1357ec45a58e3ba469a0
tree7e051b8f0cbabdf3087afc33eaba8908883d2450
parentd731ee804de4949afaff106c8c47062e88aeb603
readdir-rand: Copy full size of struct dirent

As noted in readdir(3), in the presence of long filenames it is
possible for a directory entry to be larger than `sizeof (struct dirent)`.
Copy the full length instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
tests/readdir-rand.c