1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-27 20:59:01 +00:00

Fix SEGV in a CPU hotplug environment #127 (#453)

This commit is contained in:
Daniel Pielmeier 2018-01-19 17:36:11 +01:00 committed by Brenden Matthews
parent 07475e119b
commit f93a56756b

View File

@ -923,6 +923,9 @@ int update_stat(void)
} else {
idx = 0;
}
if (idx > info.cpu_count) {
continue;
}
sscanf(buf, stat_template, &(cpu[idx].cpu_user),
&(cpu[idx].cpu_nice), &(cpu[idx].cpu_system),
&(cpu[idx].cpu_idle), &(cpu[idx].cpu_iowait),