summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_exec.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1998-07-28 00:12:56 +0000
committermillert <millert@openbsd.org>1998-07-28 00:12:56 +0000
commit9b355cb2ae160e0b4c6c4c9a8414b8249bb78ff3 (patch)
treee0cd989e8cf5bda0a1cfe0485a421226590f4e9c /sys/compat/linux/linux_exec.c
parentoops, remove bugus trailing spaces (diff)
downloadwireguard-openbsd-9b355cb2ae160e0b4c6c4c9a8414b8249bb78ff3.tar.xz
wireguard-openbsd-9b355cb2ae160e0b4c6c4c9a8414b8249bb78ff3.zip
Return EINVAL when msg_iovlen or iovcnt <= 0; Make uio_resid unsigned (size_t) and don't return EINVAL if it is < 0 in sys_{read,write}. Remove check for uio_resid < 0 uiomove() now that uio_resid is unsigned and brack remaining panics with #ifdef DIAGNOSTIC. vn_rdwr() must now take a size_t * as its 9th argument so change that and clean up uses of vn_rdwr(). Fixes 549 + more
Diffstat (limited to 'sys/compat/linux/linux_exec.c')
-rw-r--r--sys/compat/linux/linux_exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c
index 5d91784f571..453325c84f7 100644
--- a/sys/compat/linux/linux_exec.c
+++ b/sys/compat/linux/linux_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_exec.c,v 1.7 1998/03/06 22:14:01 niklas Exp $ */
+/* $OpenBSD: linux_exec.c,v 1.8 1998/07/28 00:13:23 millert Exp $ */
/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */
/*
@@ -424,7 +424,8 @@ linux_sys_uselib(p, v, retval)
struct vnode *vp;
struct exec hdr;
struct exec_vmcmd_set vcset;
- int rem, i, magic, error;
+ int i, magic, error;
+ size_t rem;
sg = stackgap_init(p->p_emul);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));