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/kern/exec_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/exec_elf.c') diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index c56713e15df..75c425402e3 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.21 1998/03/06 21:49:50 niklas Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.22 1998/07/28 00:13:02 millert Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -317,7 +317,7 @@ elf_read_from(p, vp, off, buf, size) int size; { int error; - int resid; + size_t resid; if ((error = vn_rdwr(UIO_READ, vp, buf, size, off, UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, p)) != 0) -- cgit v1.2.3