summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-31 05:50:23 +0000
commitae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6 (patch)
treef4e9c8932fa94f04eacf2118964bf3a54e5ecfe6 /managemon.c
parentReleasing debian version 4.2+20231121-1. (diff)
downloadmdadm-ae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6.tar.xz
mdadm-ae1d23c826fb3bdc59ba6b0fd64e63b7444f02b6.zip
Merging upstream version 4.2+20240118.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/managemon.c b/managemon.c
index a7bfa8f..358459e 100644
--- a/managemon.c
+++ b/managemon.c
@@ -454,7 +454,7 @@ static void manage_member(struct mdstat_ent *mdstat,
* trying to find and assign a spare.
* We do that whenever the monitor tells us too.
*/
- char buf[64];
+ char buf[SYSFS_MAX_BUF_SIZE];
int frozen;
struct supertype *container = a->container;
struct mdinfo *mdi;
@@ -664,7 +664,7 @@ static void manage_new(struct mdstat_ent *mdstat,
struct mdinfo *mdi = NULL, *di;
int i, inst;
int failed = 0;
- char buf[40];
+ char buf[SYSFS_MAX_BUF_SIZE];
/* check if array is ready to be monitored */
if (!mdstat->active || !mdstat->level)
@@ -738,7 +738,7 @@ static void manage_new(struct mdstat_ent *mdstat,
* read this information for new arrays only (empty victim)
*/
if ((victim == NULL) &&
- (sysfs_get_str(mdi, NULL, "sync_action", buf, 40) > 0) &&
+ (sysfs_get_str(mdi, NULL, "sync_action", buf, sizeof(buf)) > 0) &&
(strncmp(buf, "reshape", 7) == 0)) {
if (sysfs_get_ll(mdi, NULL, "reshape_position",
&new->last_checkpoint) != 0)