vl.values = values;
vl.values_len = 1;
vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "dns");
- strncpy (vl.type, type, sizeof (vl.type));
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
+ sstrncpy (vl.type, type, sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
plugin_dispatch_values (&vl);
} /* void submit_counter */
vl.values = values;
vl.values_len = 2;
vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "dns");
- strcpy (vl.type, "dns_octets");
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "dns", sizeof (vl.plugin));
+ sstrncpy (vl.type, "dns_octets", sizeof (vl.type));
plugin_dispatch_values (&vl);
} /* void submit_counter */