diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-05-02 20:08:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-05-05 20:47:38 +0200 |
commit | 098af0f846a87b651731780ff48420205fd33754 (patch) | |
tree | 13ef406325e5bac0f442c1e942c23bc683126d8f /Kernel/Syscalls/write.cpp | |
parent | 6d59d4d3d9e76e39112842ec487840828f1c9bfe (diff) | |
download | serenity-098af0f846a87b651731780ff48420205fd33754.zip |
Kernel: Properly define `IOV_MAX`
Diffstat (limited to 'Kernel/Syscalls/write.cpp')
-rw-r--r-- | Kernel/Syscalls/write.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Syscalls/write.cpp b/Kernel/Syscalls/write.cpp index c51e949a3d..d105761ffb 100644 --- a/Kernel/Syscalls/write.cpp +++ b/Kernel/Syscalls/write.cpp @@ -18,8 +18,7 @@ ErrorOr<FlatPtr> Process::sys$writev(int fd, Userspace<const struct iovec*> iov, if (iov_count < 0) return EINVAL; - // Arbitrary pain threshold. - if (iov_count > (int)MiB) + if (iov_count > IOV_MAX) return EFAULT; u64 total_length = 0; |