diff options
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; |