1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

Kernel: Properly define IOV_MAX

This commit is contained in:
Tim Schumacher 2022-05-02 20:08:17 +02:00 committed by Andreas Kling
parent 6d59d4d3d9
commit 098af0f846
3 changed files with 5 additions and 4 deletions

View file

@ -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;