mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
Kernel: Fix wrong-looking overflow check in sys$execve()
This was harmless since sizeof(length) and sizeof(strings) are both 4 on x86 but let's check the right things regardless.
This commit is contained in:
parent
c6a0694f50
commit
1e21d49e86
1 changed files with 1 additions and 1 deletions
|
@ -644,7 +644,7 @@ int Process::sys$execve(Userspace<const Syscall::SC_execve_params*> user_params)
|
|||
auto copy_user_strings = [](const auto& list, auto& output) {
|
||||
if (!list.length)
|
||||
return true;
|
||||
Checked size = sizeof(list.length);
|
||||
Checked size = sizeof(list.strings);
|
||||
size *= list.length;
|
||||
if (size.has_overflow())
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue