diff options
| author | David Greenman <dg@FreeBSD.org> | 1997-09-08 20:00:21 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1997-09-08 20:00:21 +0000 |
| commit | 7dfe7bef0b5f7219df449e5bfb1d370a05db7ef2 (patch) | |
| tree | db67779e3c6ce2f75451945bafc6b7c1b18d67c4 /sys/dev/ed | |
| parent | 65d6daa0da3e525942bfacbd40762e7423b638c7 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ed')
| -rw-r--r-- | sys/dev/ed/if_ed.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index a24135910545..3649ba80ba06 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.118 1997/09/02 01:18:07 bde Exp $ + * $Id: if_ed.c,v 1.119 1997/09/08 10:27:09 davidg Exp $ */ /* @@ -451,7 +451,7 @@ ed_probe_WD80x3(isa_dev) { struct ed_softc *sc = &ed_softc[isa_dev->id_unit]; int i; - u_int memsize; + u_int memsize, maddr; u_char iptr, isa16bit, sum; sc->asic_addr = isa_dev->id_iobase; @@ -629,6 +629,13 @@ ed_probe_WD80x3(isa_dev) if (isa_dev->id_msize) memsize = isa_dev->id_msize; + maddr = (u_int) isa_dev->id_maddr & 0xffffff; + if (maddr < 0xc0000 || maddr + memsize > 0x1000000) { + printf("ed%d: Invalid ISA memory address range configured: 0x%x - 0x%x\n", + isa_dev->id_unit, maddr, maddr + memsize); + return 0; + } + /* * (note that if the user specifies both of the following flags that * '8bit' mode intentionally has precedence) |
