From 86624c220d5f6b53617e929fa05923647552627c Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 9 Apr 2000 22:46:03 +0000 Subject: [PATCH] range error; < cd_ndevs, not <= --- sys/kern/subr_autoconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 1dcdcacf061..b7f89f86c2e 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_autoconf.c,v 1.26 2000/04/09 19:23:18 csapuntz Exp $ */ +/* $OpenBSD: subr_autoconf.c,v 1.27 2000/04/09 22:46:03 deraadt Exp $ */ /* $NetBSD: subr_autoconf.c,v 1.21 1996/04/04 06:06:18 cgd Exp $ */ /* @@ -809,7 +809,7 @@ device_lookup(cd, unit) { struct device *dv = NULL; - if (unit >= 0 && unit <= cd->cd_ndevs) + if (unit >= 0 && unit < cd->cd_ndevs) dv = (struct device *)(cd->cd_devs[unit]); if (!dv) -- 2.20.1