summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/realpath.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-05 17:51:37 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-05 17:51:37 +0200
commit789db813d397f476452d2ecce140385e1600a8c7 (patch)
tree745f79aa8d3f3045983666183b307777da0325e5 /Kernel/Syscalls/realpath.cpp
parentd7e5768763ff39201761e7c4dfb07cd18c724344 (diff)
downloadserenity-789db813d397f476452d2ecce140385e1600a8c7.zip
Kernel: Use copy_typed_from_user<T> for fetching syscall parameters
Diffstat (limited to 'Kernel/Syscalls/realpath.cpp')
-rw-r--r--Kernel/Syscalls/realpath.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Kernel/Syscalls/realpath.cpp b/Kernel/Syscalls/realpath.cpp
index 168ef61f6e..4262c4adef 100644
--- a/Kernel/Syscalls/realpath.cpp
+++ b/Kernel/Syscalls/realpath.cpp
@@ -15,9 +15,7 @@ KResultOr<FlatPtr> Process::sys$realpath(Userspace<const Syscall::SC_realpath_pa
{
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
REQUIRE_PROMISE(rpath);
-
- Syscall::SC_realpath_params params;
- TRY(copy_from_user(&params, user_params));
+ auto params = TRY(copy_typed_from_user(user_params));
auto path = get_syscall_path_argument(params.path);
if (path.is_error())