mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
bootchart: add assert
since 376cd3b89c 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user