1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:57:42 +00:00

Kernel: Return ENAMETOOLONG when trying to set a too-long thread name

This commit is contained in:
Sam Atkins 2023-02-04 14:14:21 +00:00 committed by Andreas Kling
parent 1014aefe64
commit e249d751c8

View file

@ -187,7 +187,7 @@ ErrorOr<FlatPtr> Process::sys$set_thread_name(pid_t tid, Userspace<char const*>
const size_t max_thread_name_size = 64;
if (name->length() > max_thread_name_size)
return EINVAL;
return ENAMETOOLONG;
auto thread = Thread::from_tid(tid);
if (!thread || thread->pid() != pid())