diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-04-17 22:11:35 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-04-17 22:11:35 +0000 |
commit | a19a369720df8c731a1ef9926bd45c36c7db8a84 (patch) | |
tree | 21a798d61c6c70bbf8305ace60bdb5010c82b2f1 | |
parent | d2de57fe36311f8f3610b1663791115523d0ebdd (diff) |
Intermediate cast of strio_offs -> uio_offset should be u_long not long
since otherwise a very high kernel address would be stored as a negative
offset. From NetBSD (christos).
-rw-r--r-- | sys/dev/systrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 4ec62be84e0..2c1fced238c 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.37 2004/11/07 20:39:31 marius Exp $ */ +/* $OpenBSD: systrace.c,v 1.38 2005/04/17 22:11:34 millert Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -1206,7 +1206,7 @@ systrace_io(struct str_process *strp, struct systrace_io *io) iov.iov_len = io->strio_len; uio.uio_iov = &iov; uio.uio_iovcnt = 1; - uio.uio_offset = (off_t)(long)io->strio_offs; + uio.uio_offset = (off_t)(u_long)io->strio_offs; uio.uio_resid = io->strio_len; uio.uio_segflg = UIO_USERSPACE; uio.uio_procp = p; |