diff --git a/src/ipvs.c b/src/ipvs.c
index a64e7b7a99d56a4896c444235a10cf14090fbdf3..87eee108a79410853b6f02e107697b7a358f465a 100644 (file)
--- a/src/ipvs.c
+++ b/src/ipvs.c
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
vl.interval = interval_g;
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "ipvs");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "ipvs", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, pi, sizeof (vl.plugin_instance));
- strcpy (vl.type, "connections");
+ sstrncpy (vl.type, "connections", sizeof (vl.type));
sstrncpy (vl.type_instance, (NULL != ti) ? ti : "total",
sizeof (vl.type_instance));
vl.values = values;
vl.values_len = 2;
- vl.time = time (NULL);
vl.interval = interval_g;
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "ipvs");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "ipvs", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, pi, sizeof (vl.plugin_instance));
sstrncpy (vl.type, t, sizeof (vl.type));
sstrncpy (vl.type_instance, (NULL != ti) ? ti : "total",
char ti[DATA_MAX_NAME_LEN];
- if (0 != get_ti (de, ti, DATA_MAX_NAME_LEN))
+ if (0 != get_ti (de, ti, sizeof (ti)))
return;
cipvs_submit_connections (pi, ti, stats.conns);
int i = 0;
- if (0 != get_pi (se, pi, DATA_MAX_NAME_LEN))
+ if (0 != get_pi (se, pi, sizeof (pi)))
return;
cipvs_submit_connections (pi, NULL, stats.conns);