summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@nokia.com>2015-02-24 18:32:31 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-24 23:51:55 -0500
commitc1682f17a0c966988e865c649e565dae41abf32d (patch)
tree030ba5ac166d10a8f710c34ed526b269f605481c
parent1d64e14c30e993c2d3dc948fe53118d8700c3ade (diff)
bootchart: svg: fix checking of list end
If we have less samples than expected, systemd-bootchart will crash.
-rw-r--r--src/bootchart/svg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index 93b4764ee7..e1fc531ba9 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -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 */