diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-23 20:34:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-23 20:34:22 +0100 |
commit | 1e21d49e8606eae91eab127ccee4e152807687eb (patch) | |
tree | 398733cf5bece6843fa2ebc0cc99d9f59c4fbae5 /Kernel | |
parent | c6a0694f50f239dd1f3f4ab6cc876a160a66f90f (diff) | |
download | serenity-1e21d49e8606eae91eab127ccee4e152807687eb.zip |
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.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Syscalls/execve.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 7b4a387b2b..e6f5e929b0 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -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; |