From 70ac9fcbf4cbec8e4d581e0b0f8b229456a5a517 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 28 Jul 1998 00:13:59 +0000 Subject: 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 --- sys/vm/vm_unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/vm') diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index 3203d8e7a23..6a1a7a21148 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_unix.c,v 1.8 1997/11/06 05:59:39 csapuntz Exp $ */ +/* $OpenBSD: vm_unix.c,v 1.9 1998/07/28 00:13:21 millert Exp $ */ /* $NetBSD: vm_unix.c,v 1.19 1996/02/10 00:08:14 christos Exp $ */ /* @@ -234,7 +234,7 @@ vm_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, offset, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *) NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) break; @@ -242,7 +242,7 @@ vm_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)cseg.c_addr, (int)cseg.c_size, offset, UIO_USERSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *) NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) break; -- cgit v1.2.3