Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe Bounds-check the 'last unit' a little more...



details:   https://anonhg.NetBSD.org/src/rev/3446e1c234f3
branches:  trunk
changeset: 482826:3446e1c234f3
user:      oster <oster%NetBSD.org@localhost>
date:      Tue Feb 22 16:07:02 2000 +0000

description:
Bounds-check the 'last unit' a little more closely.

diffstat:

 sys/dev/raidframe/rf_netbsdkintf.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 0c7170927a78 -r 3446e1c234f3 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Tue Feb 22 16:04:44 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Tue Feb 22 16:07:02 2000 +0000
@@ -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 @@
        */
 
        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;
        }



Home | Main Index | Thread Index | Old Index