Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git] / src / mbmon.c
index 50d7363..22a26da 100644 (file)
@@ -228,8 +228,8 @@ static void mbmon_submit (const char *type, const char *type_instance,
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "mbmon");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "mbmon", sizeof (vl.plugin));
        strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
 
        plugin_dispatch_values (type, &vl);