DragonFlyBSD Kernel Audit
DF-1531 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/raid/hptmv/gui_lib.c
+++ b/sys/dev/raid/hptmv/gui_lib.c
@@ -499,8 +499,8 @@
 
 			for (j=0; j<count; j++)
 				if (pIds[j]==VDEV_TO_ID(pLogical)) goto next;
+			if (count>=nMaxCount) goto done;
 			pIds[count++] = VDEV_TO_ID(pLogical);
-			if (count>=nMaxCount) goto done;
 			next:;
 		}
 	}