summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/write.cpp
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-05-02 20:08:17 +0200
committerAndreas Kling <kling@serenityos.org>2022-05-05 20:47:38 +0200
commit098af0f846a87b651731780ff48420205fd33754 (patch)
tree13ef406325e5bac0f442c1e942c23bc683126d8f /Kernel/Syscalls/write.cpp
parent6d59d4d3d9e76e39112842ec487840828f1c9bfe (diff)
downloadserenity-098af0f846a87b651731780ff48420205fd33754.zip
Kernel: Properly define `IOV_MAX`
Diffstat (limited to 'Kernel/Syscalls/write.cpp')
-rw-r--r--Kernel/Syscalls/write.cpp3
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;