diff options
author | 2004-07-03 14:36:34 +0000 | |
---|---|---|
committer | 2004-07-03 14:36:34 +0000 | |
commit | 536aca3057ae6f2537df6dc11b27f109d9e3ee44 (patch) | |
tree | 3063ebfcfd68ec68bb36b11d989d56bedd1d833f | |
parent | On 1[67]7 boards, always use the VMEChip2 timers for delay(), even if the (diff) | |
download | wireguard-openbsd-536aca3057ae6f2537df6dc11b27f109d9e3ee44.tar.xz wireguard-openbsd-536aca3057ae6f2537df6dc11b27f109d9e3ee44.zip |
Oops, one more mmap() bounds check.
-rw-r--r-- | sys/arch/mvme68k/dev/flash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mvme68k/dev/flash.c b/sys/arch/mvme68k/dev/flash.c index a2fcb412b68..fedb067a285 100644 --- a/sys/arch/mvme68k/dev/flash.c +++ b/sys/arch/mvme68k/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.13 2004/01/14 20:50:48 miod Exp $ */ +/* $OpenBSD: flash.c,v 1.14 2004/07/03 14:36:34 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -486,7 +486,7 @@ flashmmap(dev, off, prot) struct flashsoftc *sc = (struct flashsoftc *) flash_cd.cd_devs[unit]; /* allow access only in RAM */ - if (off > sc->sc_len) + if (off < 0 || off > sc->sc_len) return (-1); return (m68k_btop(sc->sc_paddr + off)); } |