Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/dev/raidframe pull up rev 1.26 from trunk (requeste...
details: https://anonhg.NetBSD.org/src/rev/b19fd38ab8f1
branches: netbsd-1-4
changeset: 469520:b19fd38ab8f1
user: cgd <cgd%NetBSD.org@localhost>
date: Tue Sep 28 04:47:51 1999 +0000
description:
pull up rev 1.26 from trunk (requested by oster):
Correct and/or improve detection of bogus row/column values passed
in via ioctls.
diffstat:
sys/dev/raidframe/rf_netbsdkintf.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diffs (50 lines):
diff -r 3954ce491313 -r b19fd38ab8f1 sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c Tue Sep 28 04:47:27 1999 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c Tue Sep 28 04:47:51 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.16.2.6 1999/09/28 04:46:28 cgd Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.16.2.7 1999/09/28 04:47:51 cgd Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -887,14 +887,11 @@
}
row = component_label->row;
- printf("Row: %d\n",row);
- if (row > raidPtrs[unit]->numRow) {
- row = 0; /* XXX */
- }
column = component_label->column;
- printf("Column: %d\n",column);
- if (column > raidPtrs[unit]->numCol) {
- column = 0; /* XXX */
+
+ if ((row < 0) || (row >= raidPtrs[unit]->numRow) ||
+ (column < 0) || (column >= raidPtrs[unit]->numCol)) {
+ return(EINVAL);
}
raidread_component_label(
@@ -931,8 +928,8 @@
row = component_label->row;
column = component_label->column;
- if ((row < 0) || (row > raidPtrs[unit]->numRow) ||
- (column < 0) || (column > raidPtrs[unit]->numCol)) {
+ if ((row < 0) || (row >= raidPtrs[unit]->numRow) ||
+ (column < 0) || (column >= raidPtrs[unit]->numCol)) {
return(EINVAL);
}
@@ -1026,8 +1023,8 @@
row = component.row;
column = component.column;
printf("Rebuild: %d %d\n",row, column);
- if ((row < 0) || (row > raidPtrs[unit]->numRow) ||
- (column < 0) || (column > raidPtrs[unit]->numCol)) {
+ if ((row < 0) || (row >= raidPtrs[unit]->numRow) ||
+ (column < 0) || (column >= raidPtrs[unit]->numCol)) {
return(EINVAL);
}
printf("Attempting a rebuild in place\n");
Home |
Main Index |
Thread Index |
Old Index