Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git] / src / nut.c
index f7f026a..695d93b 100644 (file)
--- a/src/nut.c
+++ b/src/nut.c
@@ -129,7 +129,7 @@ static void nut_submit (nut_ups_t *ups, const char *type,
       ? hostname_g
       : ups->hostname,
       sizeof (vl.host));
-  strcpy (vl.plugin, "nut");
+  sstrncpy (vl.plugin, "nut", sizeof (vl.plugin));
   strncpy (vl.plugin_instance, ups->upsname, sizeof (vl.plugin_instance));
   strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));