summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-04 04:59:30 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-07-04 04:59:30 +0000
commitf9f979589de9669fb6bc74fff6457a84dc5262e8 (patch)
treee4de3e68fcf55608feb3a6e8be383968d32c9e93 /sys
parentc25cb8ddfe34db2b4eeb27624f29a5e7a070decc (diff)
Off-by-one error in out-of-range test in bktr_open
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/bktr/bktr_os.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c
index d6f8520783a..89a808f31d6 100644
--- a/sys/dev/pci/bktr/bktr_os.c
+++ b/sys/dev/pci/bktr/bktr_os.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bktr_os.c,v 1.3 2001/06/12 15:40:33 niklas Exp $ */
+/* $OpenBSD: bktr_os.c,v 1.4 2001/07/04 04:59:29 csapuntz Exp $ */
/* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */
/*
@@ -1561,7 +1561,7 @@ bktr_open(dev_t dev, int flags, int fmt, struct proc *p)
unit = UNIT(dev);
/* unit out of range */
- if ((unit > bktr_cd.cd_ndevs) || (bktr_cd.cd_devs[unit] == NULL))
+ if ((unit >= bktr_cd.cd_ndevs) || (bktr_cd.cd_devs[unit] == NULL))
return(ENXIO);
bktr = bktr_cd.cd_devs[unit];