summaryrefslogtreecommitdiff
path: root/src/busctl
diff options
context:
space:
mode:
authorAlin Popa <alin.popa@bmw.de>2020-02-14 09:33:43 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-02-16 02:09:26 +0900
commitad5555b42e9f6c01314df9e11432f0bf90cd909d (patch)
tree5b74c13aca0c5768f898cd9c6ce84efc09a5a7f4 /src/busctl
parentbec31cf5f0037dd049299e8665e03fc74024e357 (diff)
downloadsystemd-ad5555b42e9f6c01314df9e11432f0bf90cd909d.tar.gz
systemd: Fix busctl crash on aarch64 when setting output table format
The enum used for column names is integer type while table_set_display() is parsing arguments on size_t alignment which may result in assert in table_set_display() if the size between types missmatch. This patch cast the enums to size_t. It also fixes all other occurences for table_set_display() and table_set_sort().
Diffstat (limited to 'src/busctl')
-rw-r--r--src/busctl/busctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c
index b4e133ff95..3c75be381f 100644
--- a/src/busctl/busctl.c
+++ b/src/busctl/busctl.c
@@ -207,7 +207,7 @@ static int list_bus_names(int argc, char **argv, void *userdata) {
if (r < 0)
return log_error_errno(r, "Failed to set empty string: %m");
- r = table_set_sort(table, COLUMN_NAME, (size_t) -1);
+ r = table_set_sort(table, (size_t) COLUMN_NAME, (size_t) -1);
if (r < 0)
return log_error_errno(r, "Failed to set sort column: %m");