X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpufreq.c;h=3738b54c2f450eb8f3f4e52994f9180b369d3850;hb=98fef31471541485002b5b87afa8991a280190d6;hp=f4424e6556af254d556a9b902be012fc8ff5ad83;hpb=089d33f1f455da115ca0c87160df8dbd49286377;p=collectd.git diff --git a/src/cpufreq.c b/src/cpufreq.c index f4424e65..3738b54c 100644 --- a/src/cpufreq.c +++ b/src/cpufreq.c @@ -68,9 +68,9 @@ static void cpufreq_submit (int cpu_num, double value) vl.values = values; vl.values_len = 1; vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "cpufreq"); - strcpy (vl.type, "cpufreq"); + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "cpufreq", sizeof (vl.plugin)); + sstrncpy (vl.type, "cpufreq", sizeof (vl.type)); ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%i", cpu_num);