summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FileSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/FileSystem/FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/FileSystem.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp
index c0c612c9c9..bae0038a52 100644
--- a/Kernel/FileSystem/FileSystem.cpp
+++ b/Kernel/FileSystem/FileSystem.cpp
@@ -41,6 +41,7 @@ FS::DirectoryEntry::DirectoryEntry(const char* n, InodeIdentifier i, u8 ft)
, inode(i)
, file_type(ft)
{
+ ASSERT(name_length < (int)sizeof(name));
memcpy(name, n, name_length);
name[name_length] = '\0';
}
@@ -50,6 +51,7 @@ FS::DirectoryEntry::DirectoryEntry(const char* n, int nl, InodeIdentifier i, u8
, inode(i)
, file_type(ft)
{
+ ASSERT(name_length < (int)sizeof(name));
memcpy(name, n, nl);
name[nl] = '\0';
}