mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
parent
e590c53a1d
commit
a316ca0e0d
Notes:
sideshowbarker
2024-07-19 01:48:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a316ca0e0df
@ -27,6 +27,7 @@
|
||||
#include <Kernel/FileSystem/TmpFS.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/Thread.h>
|
||||
#include <LibC/limits.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
@ -297,6 +298,9 @@ KResult TmpFSInode::add_child(Inode& child, const StringView& name, mode_t)
|
||||
ASSERT(is_directory());
|
||||
ASSERT(child.fsid() == fsid());
|
||||
|
||||
if (name.length() > NAME_MAX)
|
||||
return KResult(-ENAMETOOLONG);
|
||||
|
||||
m_children.set(name, { name, static_cast<TmpFSInode&>(child) });
|
||||
did_add_child(child.identifier());
|
||||
return KSuccess;
|
||||
|
Loading…
Reference in New Issue
Block a user