summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2000-02-22 16:07:02 +0000
committeroster <oster@NetBSD.org>2000-02-22 16:07:02 +0000
commite8ff7f615520cf279236dc8c8c05fc15b86b89ea (patch)
treeaa84518cc79460cba47a452fb561ce45fb2c0551 /sys/dev/raidframe
parent3f9cf7572c8b88aa1d88062bd8962c2737862312 (diff)
Bounds-check the 'last unit' a little more closely.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index cced6efb1aa..4b7a62ada16 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.51 2000/02/22 03:38:42 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.52 2000/02/22 16:07:02 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -3035,7 +3035,7 @@ rf_auto_config_set(cset,unit)
*/
raidID = cset->ac->clabel->last_unit;
- if (raidID >= numraid) {
+ if ((raidID < 0) || (raidID >= numraid)) {
/* let's not wander off into lala land. */
raidID = numraid - 1;
}