diff options
author | 1997-01-31 10:32:21 +0000 | |
---|---|---|
committer | 1997-01-31 10:32:21 +0000 | |
commit | 329304b72ae957c879e1f6e05e15fe0ebb0ed269 (patch) | |
tree | 2ac1648a7a1fbf2b68c2966a04940b14696e2cd0 | |
parent | if error, b_resid = b_bcount (diff) | |
download | wireguard-openbsd-329304b72ae957c879e1f6e05e15fe0ebb0ed269.tar.xz wireguard-openbsd-329304b72ae957c879e1f6e05e15fe0ebb0ed269.zip |
off-by-one in partition indexing, netbsd pr#3161, kleink@layla.inka.de
-rw-r--r-- | sys/dev/ccd.c | 4 |
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; |