diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-05 17:51:37 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-05 17:51:37 +0200 |
commit | 789db813d397f476452d2ecce140385e1600a8c7 (patch) | |
tree | 745f79aa8d3f3045983666183b307777da0325e5 /Kernel/Syscalls/stat.cpp | |
parent | d7e5768763ff39201761e7c4dfb07cd18c724344 (diff) | |
download | serenity-789db813d397f476452d2ecce140385e1600a8c7.zip |
Kernel: Use copy_typed_from_user<T> for fetching syscall parameters
Diffstat (limited to 'Kernel/Syscalls/stat.cpp')
-rw-r--r-- | Kernel/Syscalls/stat.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/stat.cpp b/Kernel/Syscalls/stat.cpp index 908213b297..262f5bc22e 100644 --- a/Kernel/Syscalls/stat.cpp +++ b/Kernel/Syscalls/stat.cpp @@ -27,8 +27,8 @@ KResultOr<FlatPtr> Process::sys$stat(Userspace<const Syscall::SC_stat_params*> u { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) REQUIRE_PROMISE(rpath); - Syscall::SC_stat_params params; - TRY(copy_from_user(¶ms, user_params)); + auto params = TRY(copy_typed_from_user(user_params)); + auto path = get_syscall_path_argument(params.path); if (path.is_error()) return path.error(); |