From 75fa96cc9b9678507b5c02a2b64ec1e90c5ee01c Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Thu, 10 Feb 2005 20:09:01 +0000 Subject: [PATCH] read(), pread(), write(), and pwrite() return EINVAL if they are asked for more than INT_MAX bytes. --- lib/libc/sys/read.2 | 5 +++++ lib/libc/sys/write.2 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index 994190c075e3..8dd7731a1935 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -180,6 +180,11 @@ is before the end-of-file, and .Fa offset is greater than or equal to the offset maximum established for this file system. +.It Bq Er EINVAL +The value +.Fa nbytes +is greater than +.Dv INT_MAX . .El .Pp In addition, diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 19b5ce2dea36..7a7cd799bd54 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -192,6 +192,11 @@ Use .Xr disklabel 8 .Fl W to enable writing on the disk label area. +.It Bq Er EINVAL +The value +.Fa nbytes +is greater than +.Dv INT_MAX . .El .Pp In addition,