Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F131544101
D29431.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
712 B
Referenced Files
None
Subscribers
None
D29431.diff
View Options
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -44,6 +44,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/dirent.h>
#include <sys/kernel.h>
#include <sys/capsicum.h>
#include <sys/fcntl.h>
@@ -747,6 +748,14 @@
return (0);
}
+/*
+ * Various filesystems expect to be able to copy a name component with length
+ * bounded by NAME_MAX into a directory entry buffer of size MAXNAMLEN. Make
+ * sure that these are the same size.
+ */
+_Static_assert(MAXNAMLEN == NAME_MAX,
+ "MAXNAMLEN and NAME_MAX have different values");
+
/*
* Search a pathname.
* This is a very central and rather complicated routine.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 10, 3:02 AM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23515666
Default Alt Text
D29431.diff (712 B)
Attached To
Mode
D29431: vfs: Add some assertions around various name length limits
Attached
Detach File
Event Timeline
Log In to Comment