mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user