diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-05-01 07:01:38 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-05-01 07:01:38 +0000 |
commit | 25bee6f33d0fd89324484168c7fc695d6e378004 (patch) | |
tree | 5077cc0c740fbb9ca87bcb2c26564e9eecf63532 | |
parent | 8c0e93fe50c62850a24107982ecf51fe063b9fe7 (diff) |
Be sure to cast physmem to a 64-bit type before passing it to ptoa().
-rw-r--r-- | sys/arch/mips64/mips64/mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/mem.c b/sys/arch/mips64/mips64/mem.c index cbb567c5bfc..3de987bc7c8 100644 --- a/sys/arch/mips64/mips64/mem.c +++ b/sys/arch/mips64/mips64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.16 2010/06/26 23:24:43 guenther Exp $ */ +/* $OpenBSD: mem.c,v 1.17 2011/05/01 07:01:37 miod Exp $ */ /* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */ /* @@ -115,7 +115,7 @@ mmrw(dev_t dev, struct uio *uio, int flags) case 0: v = uio->uio_offset; c = iov->iov_len; - if (v + c > ptoa(physmem)) + if (v + c > ptoa((psize_t)physmem)) return (EFAULT); v = (vaddr_t)PHYS_TO_XKPHYS(v, CCA_NONCOHERENT); error = uiomove((caddr_t)v, c, uio); |