diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-28 00:13:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-28 00:13:59 +0000 |
commit | 70ac9fcbf4cbec8e4d581e0b0f8b229456a5a517 (patch) | |
tree | b442ce56b4b49eb012118536460cb63905d9fb20 /sys/kern/kern_acct.c | |
parent | 7308bbe616f2495a440fa39e81d63067dad625ad (diff) |
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/kern/kern_acct.c')
-rw-r--r-- | sys/kern/kern_acct.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 32421164e78..d2ec5b7f837 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_acct.c,v 1.6 1998/05/17 10:47:35 deraadt Exp $ */ +/* $OpenBSD: kern_acct.c,v 1.7 1998/07/28 00:13:00 millert Exp $ */ /* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */ /*- @@ -219,8 +219,7 @@ acct_process(p) */ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); return (vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct), - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, - (int *)0, p)); + (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p)); } /* |