summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-02-18 18:56:34 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-02-18 18:56:34 +0000
commit53bbcbd78dd74ba9acc7a9e8eda6ae7ecf57a4b0 (patch)
tree0a08d6d5ffe3d2ccac73b23cafb099df6f74f255 /sbin
parent2affefff2d86e781072f828732c6ce9fc090dac4 (diff)
Pass correct buffer size. (sizeof(cfgPtr->spare_names[c]) != 256)
OK moritz@.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/raidctl/rf_configure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/raidctl/rf_configure.c b/sbin/raidctl/rf_configure.c
index 732673f021b..55f0c7d8a06 100644
--- a/sbin/raidctl/rf_configure.c
+++ b/sbin/raidctl/rf_configure.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_configure.c,v 1.14 2007/02/18 18:52:34 ray Exp $ */
+/* $OpenBSD: rf_configure.c,v 1.15 2007/02/18 18:56:33 ray Exp $ */
/* $NetBSD: rf_configure.c,v 1.14 2001/02/04 21:05:42 christos Exp $ */
/*
@@ -258,7 +258,7 @@ rf_MakeConfig(char *configname, RF_Config_t *cfgPtr)
cfgPtr->numSpare = 0;
for (c = 0; c < cfgPtr->numSpare; c++) {
if (rf_get_next_nonblank_line(&cfgPtr->spare_names[c][0],
- 256, fp, NULL)) {
+ sizeof(cfgPtr->spare_names[c]), fp, NULL)) {
RF_ERRORMSG1("Config file error: unable to get device file for spare disk %d\n",c);
retcode = -1;
goto out;