vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- vl.time = time (NULL);
sstrncpy (vl.host,
(strcasecmp (ups->hostname, "localhost") == 0)
? hostname_g
: ups->hostname,
sizeof (vl.host));
- strcpy (vl.plugin, "nut");
+ sstrncpy (vl.plugin, "nut", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, ups->upsname, sizeof (vl.plugin_instance));
sstrncpy (vl.type, type, sizeof (vl.type));
sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));