mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
Kernel: Properly define IOV_MAX
This commit is contained in:
parent
6d59d4d3d9
commit
098af0f846
Notes:
sideshowbarker
2024-07-17 11:18:45 +09:00
Author: https://github.com/timschumi
Commit: 098af0f846
Pull-request: https://github.com/SerenityOS/serenity/pull/13886
Reviewed-by: https://github.com/petelliott ✅
3 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue