X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fxmms.c;h=09786fc9282b6f01bd8568750b771e4f8df039ea;hb=92445ff3363441d0f515de4a3ab92a504cfc0366;hp=1e646d21165722b289f6721dd672837e03b5b40c;hpb=58ecdb7ff9a4d90e87daecca05b9cb4a43070fd7;p=collectd.git diff --git a/src/xmms.c b/src/xmms.c index 1e646d21..09786fc9 100644 --- a/src/xmms.c +++ b/src/xmms.c @@ -37,10 +37,11 @@ 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)); + sstrncpy (vl.type, type, sizeof (vl.type)); - plugin_dispatch_values (type, &vl); + plugin_dispatch_values (&vl); } /* void cxmms_submit */ int cxmms_read (void)