From 8503ba1f91f20d4a339cd0825a4c416731a0fda7 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Thu, 16 May 2024 00:45:06 +0900
Subject: [PATCH 0634/1160] systemctl: fix "applying zero offset to null
pointer" UBSan error
Fixes #32837.
(cherry picked from commit 60dbecff27159a34be044b082d3688e62e67a4cb)
src/systemctl/systemctl-list-unit-files.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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;
--
2.33.0