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/open.cpp | |
parent | d7e5768763ff39201761e7c4dfb07cd18c724344 (diff) | |
download | serenity-789db813d397f476452d2ecce140385e1600a8c7.zip |
Kernel: Use copy_typed_from_user<T> for fetching syscall parameters
Diffstat (limited to 'Kernel/Syscalls/open.cpp')
-rw-r--r-- | Kernel/Syscalls/open.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp index 00593129e4..86775e436c 100644 --- a/Kernel/Syscalls/open.cpp +++ b/Kernel/Syscalls/open.cpp @@ -14,8 +14,7 @@ namespace Kernel { KResultOr<FlatPtr> Process::sys$open(Userspace<const Syscall::SC_open_params*> user_params) { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) - Syscall::SC_open_params params; - TRY(copy_from_user(¶ms, user_params)); + auto params = TRY(copy_typed_from_user(user_params)); int dirfd = params.dirfd; int options = params.options; |