systemctl: fix "applying zero offset to null pointer" UBSan error

Fixes #32837.
This commit is contained in:
Yu Watanabe
2024-05-15 20:24:03 +02:00
committed by Luca Boccassi
parent 2aee829fc8
commit 60dbecff27
+1 -1
View File
@@ -79,7 +79,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
table_set_ersatz_string(table, TABLE_ERSATZ_DASH);
for (const UnitFileList *u = units; u < units + c; u++) {
FOREACH_ARRAY(u, units, c) {
const char *on_underline = NULL, *on_unit_color = NULL, *id;
bool underline;