@cryptotaxi247 / netdata-1 / commits / 26a0c5267

Fix crash on FreeBSD due to do_dev_cpu_temperature stack corrup… (#7014)

Alex Samorukov committed Oct 8, 2019 at 11:40 UTC 26a0c5267558fa2cd153fd035feb56b217b5ce90
1 file changed +1 -1
collectors/freebsd.plugin/freebsd_sysctl.c
+1 -1
@@ -470,7 +470,7 @@ int do_dev_cpu_temperature(int update_every, usec_t dt) {
470 pcpu_temperature = reallocz(pcpu_temperature, sizeof(int) * number_of_cpus);
471 mib = reallocz(mib, sizeof(int) * number_of_cpus * 4);
472 if (unlikely(number_of_cpus > old_number_of_cpus))
473 - memset(&mib[old_number_of_cpus * 4], 0, sizeof(RRDDIM) * (number_of_cpus - old_number_of_cpus));
473 + memset(&mib[old_number_of_cpus * 4], 0, 4 * (number_of_cpus - old_number_of_cpus));
474 }
475 for (i = 0; i < number_of_cpus; i++) {
476 if (unlikely(!(mib[i * 4])))