diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-31 16:34:47 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-31 16:34:47 +0200 |
commit | 62a4099581ce99aef46ab698aa260b155de62f47 (patch) | |
tree | fd3af6ea8104270c0eb8902b6eed51e1bc475bcf /Kernel/Syscalls/chdir.cpp | |
parent | 314dbc10d47f986cf98dcbb4bd746ab9a15ef85e (diff) | |
download | serenity-62a4099581ce99aef46ab698aa260b155de62f47.zip |
Kernel: Use Userspace<T> in sys$getcwd() and sys$chdir()
Add more validation helper overloads as we go. :^)
Diffstat (limited to 'Kernel/Syscalls/chdir.cpp')
-rw-r--r-- | Kernel/Syscalls/chdir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/chdir.cpp b/Kernel/Syscalls/chdir.cpp index b815ba8491..68437ab0a9 100644 --- a/Kernel/Syscalls/chdir.cpp +++ b/Kernel/Syscalls/chdir.cpp @@ -31,7 +31,7 @@ namespace Kernel { -int Process::sys$chdir(const char* user_path, size_t path_length) +int Process::sys$chdir(Userspace<const char*> user_path, size_t path_length) { REQUIRE_PROMISE(rpath); auto path = get_syscall_path_argument(user_path, path_length); @@ -61,7 +61,7 @@ int Process::sys$fchdir(int fd) return 0; } -int Process::sys$getcwd(char* buffer, ssize_t size) +int Process::sys$getcwd(Userspace<char*> buffer, ssize_t size) { REQUIRE_PROMISE(rpath); if (size < 0) |