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:
+1
-1
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user