Code

Merge branch 'collectd-4.4'
[collectd.git] / src / multimeter.c
index e09d9f989f5092db830b1998258b3a4d703fa516..994747f94f4167c352febc69c8ca4eb884c28650 100644 (file)
@@ -216,9 +216,9 @@ static void multimeter_submit (double value)
        vl.values = values;
        vl.values_len = 1;
        vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "multimeter");
-       strcpy (vl.type, "multimeter");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "multimeter", sizeof (vl.plugin));
+       sstrncpy (vl.type, "multimeter", sizeof (vl.type));
 
        plugin_dispatch_values (&vl);
 }