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().
This commit is contained in:
Alin Popa
2020-02-16 02:09:26 +09:00
committed by Yu Watanabe
parent bec31cf5f0
commit ad5555b42e
8 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -991,7 +991,7 @@ static int output_sockets_list(struct socket_info *socket_infos, unsigned cs) {
if (!arg_show_types) {
/* Hide the second (TYPE) column */
r = table_set_display(table, 0, 2, 3, (size_t) -1);
r = table_set_display(table, (size_t) 0, (size_t) 2, (size_t) 3, (size_t) -1);
if (r < 0)
return log_error_errno(r, "Failed to set columns to display: %m");
}