Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git] / src / users.c
index afe26e1..5e6a0b5 100644 (file)
@@ -45,8 +45,8 @@ static void users_submit (gauge_t value)
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "users");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "users", sizeof (vl.plugin));
 
        plugin_dispatch_values ("users", &vl);
 } /* void users_submit */