mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
Kernel: Forbid empty and whitespace-only process names
Those only exist to confuse the user anyway. Found while using fuzz-syscalls.
This commit is contained in:
parent
4c42d1e35a
commit
987b7f7917
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ int Process::sys$set_process_name(Userspace<const char*> user_name, size_t user_
|
|||
auto name = copy_string_from_user(user_name, user_name_length);
|
||||
if (name.is_null())
|
||||
return -EFAULT;
|
||||
// Empty and whitespace-only names only exist to confuse users.
|
||||
if (name.is_whitespace())
|
||||
return -EINVAL;
|
||||
m_name = move(name);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue