[systemd-commits] src/bootchart
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Wed Jun 18 15:18:30 PDT 2014
src/bootchart/svg.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 8271bd16ce9327834d8580e55bb5e4e0896fd98a
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Wed Jun 18 23:35:01 2014 +0200
bootchart: add assert
since 376cd3b89c62f580a6f576cecfbbb28d3944118f LIST_FIND_TAIL accepts
an empty list. That removed an assert in LIST_FIND_TAIL and we now
theoretically risk a null pointer deref. This adds the assert directly
to protect against that.
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index 8121199..bf6636c 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -80,6 +80,8 @@ static void svg_header(void) {
double h;
struct list_sample_data *sampledata_last;
+ assert(head);
+
sampledata = head;
LIST_FIND_TAIL(link, sampledata, head);
sampledata_last = head;
More information about the systemd-commits
mailing list