X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftape.c;h=caca537b0038be024f2771d979f3eeeb289ce53d;hb=eb78f4965a6a2cd25c54ffb832f5e42744d968ad;hp=67750efc43868eb9134447447dbac7a4a44109e5;hpb=089d33f1f455da115ca0c87160df8dbd49286377;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));