diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-20 15:57:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-20 15:57:26 +0000 |
commit | ecd1eefababcba78141cf35e53ce1986f3041da8 (patch) | |
tree | 6a753b12df8dbc8d426b35ed136631986c0d11da /sys/dev/isa | |
parent | 449e79b885b59db7893cf4f923168ccc0a9f7b8f (diff) |
careful off handling in mmap routines
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/isadma.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/isa/isadma.c b/sys/dev/isa/isadma.c index 2a07a876042..3fab93036c8 100644 --- a/sys/dev/isa/isadma.c +++ b/sys/dev/isa/isadma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isadma.c,v 1.19 1998/03/02 07:02:08 todd Exp $ */ +/* $OpenBSD: isadma.c,v 1.20 1998/11/20 15:57:20 deraadt Exp $ */ /* $NetBSD: isadma.c,v 1.32 1997/09/05 01:48:33 thorpej Exp $ */ /*- @@ -584,6 +584,9 @@ isa_dmamem_free(isadev, chan, addr, size) panic("isa_dmamem_free"); } + if (off < 0) + return (-1); + seg.ds_addr = addr; seg.ds_len = size; |