diff --git a/Kernel/Syscalls/write.cpp b/Kernel/Syscalls/write.cpp index a2545d84696..b80f6c6912d 100644 --- a/Kernel/Syscalls/write.cpp +++ b/Kernel/Syscalls/write.cpp @@ -37,12 +37,9 @@ ssize_t Process::sys$writev(int fd, Userspace iov, int iov_ if (iov_count < 0) return -EINVAL; - { - Checked checked_iov_count = sizeof(iovec); - checked_iov_count *= iov_count; - if (checked_iov_count.has_overflow()) - return -EFAULT; - } + // Arbitrary pain threshold. + if (iov_count > (int)MiB) + return -EFAULT; u64 total_length = 0; Vector vecs;