summaryrefslogtreecommitdiff
path: root/procfs
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-03 02:02:56 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-02-03 02:03:05 +0100
commitb7287f6c4830d2957645abb3217f46489dc7bea3 (patch)
tree38987a11feed3a4e3d5cc797b06000c8068c74a7 /procfs
parentac20d9497e3195842958f172801493ce82dfd63b (diff)
procfs: Actually add padding to align struct dirent
d21b09b32895 was computing the amount and filling it, but not actually enforcing it.
Diffstat (limited to 'procfs')
-rw-r--r--procfs/netfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/procfs/netfs.c b/procfs/netfs.c
index 967e6109..8940dfb4 100644
--- a/procfs/netfs.c
+++ b/procfs/netfs.c
@@ -134,6 +134,8 @@ static int putentries (char *contents, size_t contents_len, int nentries,
int extra = reclen & (align - 1);
int pad = extra ? align - extra : 0;
+ reclen += pad;
+
if (data)
{
struct dirent *d = (struct dirent *) (data + *datacnt);