1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

bootchart: svg: fix checking of list end

If we have less samples than expected, systemd-bootchart will crash.
This commit is contained in:
Aaro Koskinen 2015-02-24 18:32:31 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 1d64e14c30
commit c1682f17a0

View File

@ -1167,7 +1167,7 @@ static void svg_ps_bars(void) {
ps->sample = ps->sample->next;
sample_hz = ps->sample;
for (ii=0;((ii<(int)arg_hz/2)&&(ps->sample->next));ii++)
for (ii=0;((ii<(int)arg_hz/2)&&(sample_hz->next));ii++)
sample_hz = sample_hz->next;
/* subtract bootchart cpu utilization from total */