Replace all occurrences of `strcpy' with `sstrncpy'.
[collectd.git] / src / xmms.c
index 1e646d2..7f3edf0 100644 (file)
@@ -37,8 +37,8 @@ static void cxmms_submit (const char *type, gauge_t value)
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "xmms");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "xmms", sizeof (vl.plugin));
 
        plugin_dispatch_values (type, &vl);
 } /* void cxmms_submit */