diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-05-15 17:45:06 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-05-15 20:24:03 +0200 |
commit | 60dbecff27159a34be044b082d3688e62e67a4cb (patch) | |
tree | efb8e347f52e9c0b12bc7694c124580cd2c8969e /src/systemctl/systemctl-list-unit-files.c | |
parent | test/test-rpm-macros.sh: add build directory to pkg-config search path (diff) | |
download | systemd-60dbecff27159a34be044b082d3688e62e67a4cb.tar.xz systemd-60dbecff27159a34be044b082d3688e62e67a4cb.zip |
systemctl: fix "applying zero offset to null pointer" UBSan error
Fixes #32837.
Diffstat (limited to 'src/systemctl/systemctl-list-unit-files.c')
-rw-r--r-- | src/systemctl/systemctl-list-unit-files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-list-unit-files.c b/src/systemctl/systemctl-list-unit-files.c index fc1ad9800a..b8b1531834 100644 --- a/src/systemctl/systemctl-list-unit-files.c +++ b/src/systemctl/systemctl-list-unit-files.c @@ -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; |