X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fhddtemp.c;h=9f4a7254feede2d27d057bdf5750bb1ee3f73ba2;hb=6a968db27aab6d8c4cfe4f6e4c5bf3183eb84794;hp=a9c094186516b699c7771249c29a026bbf2d2891;hpb=5f9ec13b946733ff4e1edf2d8e3b7a22311dd894;p=collectd.git diff --git a/src/hddtemp.c b/src/hddtemp.c index a9c09418..9f4a7254 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -448,9 +448,9 @@ static void hddtemp_submit (char *type_instance, double value) vl.values = values; vl.values_len = 1; vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "hddtemp"); - strcpy (vl.type, "temperature"); + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "hddtemp", sizeof (vl.plugin)); + sstrncpy (vl.type, "temperature", sizeof (vl.type)); sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance)); plugin_dispatch_values (&vl);