diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-20 16:56:00 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-11-20 16:56:00 +0000 |
commit | 2d12691ba8fdc3ede682783181161000dc15764a (patch) | |
tree | 6e40ed0ec99dc155f5fb8ff56fb14f1af18e3e3c /sys/dev/pci | |
parent | 325fbd57644bbd42071be327eaf8862f81860107 (diff) |
careful mmap
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/brooktree848.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/brooktree848.c b/sys/dev/pci/brooktree848.c index b94ceea25ae..0bf1be76596 100644 --- a/sys/dev/pci/brooktree848.c +++ b/sys/dev/pci/brooktree848.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brooktree848.c,v 1.4 1998/10/10 06:39:23 downsj Exp $ */ +/* $OpenBSD: brooktree848.c,v 1.5 1998/11/20 16:55:59 deraadt Exp $ */ /* $FreeBSD: brooktree848.c,v 1.56 1998/10/01 09:35:48 sos Exp $ */ /* BT848 Driver for Brooktree's Bt848 based cards. The Brooktree BT848 Driver driver is based upon Mark Tinguely and @@ -3394,6 +3394,8 @@ bktr_mmap( dev_t dev, int offset, int nprot ) if (nprot & PROT_EXEC) return( -1 ); + if (offset < 0) + return (-1); if (offset >= bktr->alloc_pages * PAGE_SIZE) return( -1 ); |