|
@@ -544,7 +544,7 @@ int Process::exec(String path, Vector<String> arguments, Vector<String> environm
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int Process::sys$execve(const Syscall::SC_execve_params* user_params)
|
|
|
+int Process::sys$execve(Userspace<const Syscall::SC_execve_params*> user_params)
|
|
|
{
|
|
|
REQUIRE_PROMISE(exec);
|
|
|
|
|
@@ -568,14 +568,14 @@ int Process::sys$execve(const Syscall::SC_execve_params* user_params)
|
|
|
path = path_arg.value();
|
|
|
}
|
|
|
|
|
|
- auto copy_user_strings = [&](const auto& list, auto& output) {
|
|
|
+ auto copy_user_strings = [this](const auto& list, auto& output) {
|
|
|
if (!list.length)
|
|
|
return true;
|
|
|
if (!validate_read_typed(list.strings, list.length))
|
|
|
return false;
|
|
|
Vector<Syscall::StringArgument, 32> strings;
|
|
|
strings.resize(list.length);
|
|
|
- copy_from_user(strings.data(), list.strings, list.length * sizeof(Syscall::StringArgument));
|
|
|
+ copy_from_user(strings.data(), list.strings.unsafe_userspace_ptr(), list.length * sizeof(Syscall::StringArgument));
|
|
|
for (size_t i = 0; i < list.length; ++i) {
|
|
|
auto string = validate_and_copy_string_from_user(strings[i]);
|
|
|
if (string.is_null())
|