Merge branch 'collectd-4.4'
[collectd.git] / src / hddtemp.c
index a9c0941..9f4a725 100644 (file)
@@ -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);