summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/dev/asc.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-20 23:57:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-11-20 23:57:25 +0000
commitfcccc2df555ee1b5b321a5bd24181c30337b92d4 (patch)
tree2298611d5e221017871e49e8ddc2a86ca1c19a2c /sys/arch/mac68k/dev/asc.c
parenta96bf9709fbfeaf2af29399fe4c98f3db15ad681 (diff)
careful mmap
Diffstat (limited to 'sys/arch/mac68k/dev/asc.c')
-rw-r--r--sys/arch/mac68k/dev/asc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c
index e28c325f1d7..5cd6ce22626 100644
--- a/sys/arch/mac68k/dev/asc.c
+++ b/sys/arch/mac68k/dev/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.7 1998/04/27 02:04:32 gene Exp $ */
+/* $OpenBSD: asc.c,v 1.8 1998/11/20 23:57:24 deraadt Exp $ */
/* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */
/*
@@ -281,7 +281,7 @@ ascmmap(dev, off, prot)
vm_offset_t pa;
sc = asc_cd.cd_devs[unit];
- if (off < MAC68K_ASC_LEN) {
+ if (off >= 0 && off < MAC68K_ASC_LEN) {
pa = pmap_extract(pmap_kernel(), (vm_offset_t)sc->sc_handle);
return mac68k_btop(pa + off);
}