diff --git a/repmgr-action-cluster.c b/repmgr-action-cluster.c index 7049eb48..971c4ea7 100644 --- a/repmgr-action-cluster.c +++ b/repmgr-action-cluster.c @@ -1065,7 +1065,7 @@ build_cluster_matrix(t_node_matrix_rec ***matrix_rec_dest, int *name_length, Ite matrix_rec_list[i]->node_id = cell->node_info->node_id; strncpy(matrix_rec_list[i]->node_name, cell->node_info->node_name, - sizeof(cell->node_info->node_name)); + sizeof(matrix_rec_list[i]->node_name)); /* * Find the maximum length of a node name @@ -1280,7 +1280,7 @@ build_cluster_crosscheck(t_node_status_cube ***dest_cube, int *name_length, Item cube[h] = (t_node_status_cube *) pg_malloc(sizeof(t_node_status_cube)); cube[h]->node_id = cell->node_info->node_id; - strncpy(cube[h]->node_name, cell->node_info->node_name, sizeof(cell->node_info->node_name)); + strncpy(cube[h]->node_name, cell->node_info->node_name, sizeof(cube[h]->node_name)); /* * Find the maximum length of a node name