summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1994-03-25 04:38:01 +0000
committermycroft <mycroft@NetBSD.org>1994-03-25 04:38:01 +0000
commit008f13bb6981e2f9ceec1a93cf59b4e82b3bd98d (patch)
tree7a2a8b2e1efc973b11c80e3217e6282a5d452320 /sys/dev/ic
parent9c8b310d5ecf2d616303ecab5c0fa541640f4f95 (diff)
Fix off-by-one error in comopen() unit number sanity check. From Brian de
Alwis.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/com.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 0ca439f9f19..058d6c8c828 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: com.c,v 1.27 1994/03/23 03:01:53 mycroft Exp $
+ * $Id: com.c,v 1.28 1994/03/25 04:38:01 mycroft Exp $
*/
/*
@@ -279,7 +279,7 @@ comopen(dev, flag, mode, p)
int s;
int error = 0;
- if (unit > NCOM)
+ if (unit >= NCOM)
return ENXIO;
sc = &com_softc[unit];
if (!sc->sc_iobase)