X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftape.c;h=caca537b0038be024f2771d979f3eeeb289ce53d;hb=068ae14b916aa298995433da83302032c5e57c76;hp=67750efc43868eb9134447447dbac7a4a44109e5;hpb=c28bc580c110c78741d0805c7652e05d994b0ff4;p=collectd.git diff --git a/src/tape.c b/src/tape.c index 67750efc..caca537b 100644 --- a/src/tape.c +++ b/src/tape.c @@ -69,8 +69,8 @@ static void tape_submit (const char *plugin_instance, vl.values = values; vl.values_len = 2; vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "tape"); + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "tape", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance)); sstrncpy (vl.type, type, sizeof (vl.type));