diff options
author | Andreas Kling <kling@serenityos.org> | 2021-12-17 09:12:20 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-18 11:30:10 +0100 |
commit | abf22044028291769e5a7cddd6a2d8af0f4fedb0 (patch) | |
tree | 7142b29e57d8ed415e5926059dc5fbca7bacbef3 /Kernel/Syscalls/socket.cpp | |
parent | 39d9337db5056c9d8c9eb17cbceb6cec0b627510 (diff) | |
download | serenity-abf22044028291769e5a7cddd6a2d8af0f4fedb0.zip |
Kernel: Use copy_typed_from_user() in more places :^)
Diffstat (limited to 'Kernel/Syscalls/socket.cpp')
-rw-r--r-- | Kernel/Syscalls/socket.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp index 5f0a40a43d..b7cd325d53 100644 --- a/Kernel/Syscalls/socket.cpp +++ b/Kernel/Syscalls/socket.cpp @@ -162,8 +162,7 @@ ErrorOr<FlatPtr> Process::sys$sendmsg(int sockfd, Userspace<const struct msghdr* { VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this) REQUIRE_PROMISE(stdio); - struct msghdr msg = {}; - TRY(copy_from_user(&msg, user_msg)); + auto msg = TRY(copy_typed_from_user(user_msg)); if (msg.msg_iovlen != 1) return ENOTSUP; // FIXME: Support this :) |