diff options
author | 1998-07-28 04:49:31 +0000 | |
---|---|---|
committer | 1998-07-28 04:49:31 +0000 | |
commit | 1f058c2211f0b9214f1e14eefce68dfc96c2c931 (patch) | |
tree | bc428956e3d1f21a9312cb07a0e42c78a3cbfe3d /lib/libc/sys | |
parent | Don't assume uio_resid can go negative when detecting oflow (diff) | |
download | wireguard-openbsd-1f058c2211f0b9214f1e14eefce68dfc96c2c931.tar.xz wireguard-openbsd-1f058c2211f0b9214f1e14eefce68dfc96c2c931.zip |
document EINVAL due to overflow
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/recv.2 | 22 | ||||
-rw-r--r-- | lib/libc/sys/send.2 | 16 |
2 files changed, 33 insertions, 5 deletions
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2 index aa06cdb11b9..6da1689db3f 100644 --- a/lib/libc/sys/recv.2 +++ b/lib/libc/sys/recv.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: recv.2,v 1.6 1998/07/06 18:28:18 deraadt Exp $ +.\" $OpenBSD: recv.2,v 1.7 1998/07/28 04:49:31 millert Exp $ .\" $NetBSD: recv.2,v 1.6 1995/02/27 12:36:08 cgd Exp $ .\" .\" Copyright (c) 1983, 1990, 1991, 1993 @@ -34,7 +34,7 @@ .\" .\" @(#)recv.2 8.3 (Berkeley) 2/21/94 .\" -.Dd February 21, 1994 +.Dd July 27, 1998 .Dt RECV 2 .Os BSD 4.3r .Sh NAME @@ -226,7 +226,11 @@ is returned to indicate that expedited or out-of-band data were received. These calls return the number of bytes received, or -1 if an error occurred. .Sh ERRORS -The calls fail if: +.Fn Recv , +.Fn recvfrom , +and +.Fn recvmsg +fail if: .Bl -tag -width Er .It Bq Er EBADF The argument @@ -254,6 +258,18 @@ any data were available. The receive buffer pointer(s) point outside the process's address space. .El +.Pp +In addition, +.Fn recvmsg +may return following error: +.Bl -tag -width Er +.It Bq Er EINVAL +The sum of the +.Fa iov_len +values in the +.Fa msg_iov +array overflowed an unsigned 32-bit integer. +.El .Sh SEE ALSO .Xr fcntl 2 , .Xr read 2 , diff --git a/lib/libc/sys/send.2 b/lib/libc/sys/send.2 index b57984678b7..be9234bae76 100644 --- a/lib/libc/sys/send.2 +++ b/lib/libc/sys/send.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: send.2,v 1.5 1998/07/06 18:28:26 deraadt Exp $ +.\" $OpenBSD: send.2,v 1.6 1998/07/28 04:49:32 millert Exp $ .\" $NetBSD: send.2,v 1.6 1996/01/15 01:17:18 thorpej Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -34,7 +34,7 @@ .\" .\" @(#)send.2 8.2 (Berkeley) 2/21/94 .\" -.Dd February 21, 1994 +.Dd July 27, 1998 .Dt SEND 2 .Os BSD 4.2 .Sh NAME @@ -159,6 +159,18 @@ The .Fa flags parameter is invalid. .El +.Pp +In addition, +.Fn sendmsg +may return following error: +.Bl -tag -width Er +.It Bq Er EINVAL +The sum of the +.Fa iov_len +values in the +.Fa msg_iov +array overflowed an unsigned 32-bit integer. +.El .Sh SEE ALSO .Xr fcntl 2 , .Xr recv 2 , |