From d189f00f381b64058cfcf31f61b74fcbcc859487 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Sun, 12 Jan 2025 16:03:09 +0200 Subject: [PATCH] Kernel: Null terminate tmpfs directory entries --- kernel/kernel/FS/TmpFS/Inode.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/kernel/FS/TmpFS/Inode.cpp b/kernel/kernel/FS/TmpFS/Inode.cpp index 69877981..ec7f12a4 100644 --- a/kernel/kernel/FS/TmpFS/Inode.cpp +++ b/kernel/kernel/FS/TmpFS/Inode.cpp @@ -473,6 +473,7 @@ namespace Kernel dirp->d_ino = entry.ino; dirp->d_type = entry.type; strncpy(dirp->d_name, entry.name, entry.name_len); + dirp->d_name[entry.name_len] = '\0'; dirp++; }