mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 21:51:37 +00:00
bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.
(cherry picked from commit c1682f17a0)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
f17b6474aa
commit
668529dde3
+1
-1
@@ -1170,7 +1170,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 */
|
||||
|
||||
Reference in New Issue
Block a user