diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-14 21:11:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-14 21:11:02 +0000 |
commit | 3179de04f9ee1a52bedc411b7a5c9389aec836a5 (patch) | |
tree | f260b707fec3b1204ab2c433572659b4cda457d3 /sys/kern | |
parent | 2a34de06e66d328c5c3ab085002ef1110d6d1702 (diff) |
Use IOV_MAX, not the deprecated UIO_MAXIOV
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_generic.c | 6 | ||||
-rw-r--r-- | sys/kern/uipc_syscalls.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index ee5b7345931..9e379a48fb6 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.16 1999/02/14 19:02:21 millert Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.17 1999/02/14 21:11:01 millert Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -163,7 +163,7 @@ sys_readv(p, v, retval) /* note: can't use iovlen until iovcnt is validated */ iovlen = SCARG(uap, iovcnt) * sizeof (struct iovec); if (SCARG(uap, iovcnt) > UIO_SMALLIOV) { - if (SCARG(uap, iovcnt) > UIO_MAXIOV) + if (SCARG(uap, iovcnt) > IOV_MAX) return (EINVAL); MALLOC(iov, struct iovec *, iovlen, M_IOV, M_WAITOK); needfree = iov; @@ -318,7 +318,7 @@ sys_writev(p, v, retval) /* note: can't use iovlen until iovcnt is validated */ iovlen = SCARG(uap, iovcnt) * sizeof (struct iovec); if (SCARG(uap, iovcnt) > UIO_SMALLIOV) { - if (SCARG(uap, iovcnt) > UIO_MAXIOV) + if (SCARG(uap, iovcnt) > IOV_MAX) return (EINVAL); MALLOC(iov, struct iovec *, iovlen, M_IOV, M_WAITOK); needfree = iov; diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index a4e1c0fd2ab..39b89b18242 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.16 1999/02/14 19:24:05 millert Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.17 1999/02/14 21:11:01 millert Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -389,7 +389,7 @@ sys_sendmsg(p, v, retval) error = copyin(SCARG(uap, msg), (caddr_t)&msg, sizeof (msg)); if (error) return (error); - if (msg.msg_iovlen <= 0 || msg.msg_iovlen > UIO_MAXIOV) + if (msg.msg_iovlen <= 0 || msg.msg_iovlen > IOV_MAX) return (EMSGSIZE); if (msg.msg_iovlen > UIO_SMALLIOV) MALLOC(iov, struct iovec *, @@ -573,7 +573,7 @@ sys_recvmsg(p, v, retval) sizeof (msg)); if (error) return (error); - if (msg.msg_iovlen <= 0 || msg.msg_iovlen > UIO_MAXIOV) + if (msg.msg_iovlen <= 0 || msg.msg_iovlen > IOV_MAX) return (EMSGSIZE); if (msg.msg_iovlen > UIO_SMALLIOV) MALLOC(iov, struct iovec *, |