From e8ff7f615520cf279236dc8c8c05fc15b86b89ea Mon Sep 17 00:00:00 2001 From: oster Date: Tue, 22 Feb 2000 16:07:02 +0000 Subject: Bounds-check the 'last unit' a little more closely. --- sys/dev/raidframe/rf_netbsdkintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/raidframe') 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; } -- cgit