diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 61a0ffd11a..f4575f8f6a 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -885,13 +885,13 @@ int Process::sys$execve(Userspace user_params) auto copy_user_strings = [](const auto& list, auto& output) { if (!list.length) return true; - Checked size = sizeof(list.strings); + Checked size = sizeof(*list.strings); size *= list.length; if (size.has_overflow()) return false; Vector strings; strings.resize(list.length); - if (!copy_from_user(strings.data(), list.strings, list.length * sizeof(Syscall::StringArgument))) + if (!copy_from_user(strings.data(), list.strings, list.length * sizeof(*list.strings))) return false; for (size_t i = 0; i < list.length; ++i) { auto string = copy_string_from_user(strings[i]);