summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-31 10:32:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-31 10:32:22 +0000
commit1d9758461cf0b62314cedb3cc91d8bd97f0e5042 (patch)
treed61144f62e9804dafad2294094f3d6cb0cf40c15 /sys
parentf628bcbf5e2f7ac832eefd360527932bd8ef3ef3 (diff)
off-by-one in partition indexing, netbsd pr#3161, kleink@layla.inka.de
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ccd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c
index 0dd31541ff5..94bed785260 100644
--- a/sys/dev/ccd.c
+++ b/sys/dev/ccd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccd.c,v 1.14 1997/01/31 10:31:43 deraadt Exp $ */
+/* $OpenBSD: ccd.c,v 1.15 1997/01/31 10:32:21 deraadt Exp $ */
/* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */
/*-
@@ -561,7 +561,7 @@ ccdopen(dev, flags, fmt, p)
/* Check that the partition exists. */
if (part != RAW_PART) {
if (((cs->sc_flags & CCDF_INITED) == 0) ||
- ((part > lp->d_npartitions) ||
+ ((part >= lp->d_npartitions) ||
(lp->d_partitions[part].p_fstype == FS_UNUSED))) {
error = ENXIO;
goto done;