diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-11 01:14:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-02-11 01:14:07 +0000 |
commit | aa696b5a3a4373f55749e4fb548c65f8e5a08d78 (patch) | |
tree | c4267ae8789bfbf0f0e7b736f8aa14eac518e5ab /sys/arch/sparc64 | |
parent | 073a443973a57f090644c4a40c4d99f87edc446f (diff) |
Convert to uiomove(). ok kettenis@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/openprom.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/sparc64/sparc64/openprom.c b/sys/arch/sparc64/sparc64/openprom.c index cecd008897c..33c022f5ab3 100644 --- a/sys/arch/sparc64/sparc64/openprom.c +++ b/sys/arch/sparc64/sparc64/openprom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openprom.c,v 1.19 2015/02/10 21:56:09 miod Exp $ */ +/* $OpenBSD: openprom.c,v 1.20 2015/02/11 01:14:06 miod Exp $ */ /* $NetBSD: openprom.c,v 1.4 2002/01/10 06:21:53 briggs Exp $ */ /* @@ -99,6 +99,9 @@ openpromread(dev_t dev, struct uio *uio, int flags) if (minor(dev) != 1) return (ENXIO); + if (uio->uio_offset < 0) + return (EINVAL); + while (uio->uio_resid > 0) { if (uio->uio_offset >= mdesc_len) break; @@ -108,7 +111,7 @@ openpromread(dev_t dev, struct uio *uio, int flags) if (len > uio->uio_resid) len = uio->uio_resid; - error = uiomovei(v, len, uio); + error = uiomove(v, len, uio); if (error) return (error); } |