systemd: Fix busctl crash on aarch64 when setting output table format
authorAlin Popa <alin.popa@bmw.de>
Fri, 14 Feb 2020 08:33:43 +0000 (09:33 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 15 Feb 2020 17:09:26 +0000 (02:09 +0900)
commitbec31cf5f0037dd049299e8665e03fc74024e357
treed97bd1ed6fb7b2e968823c65cd2ef91e474117c9
parentc315b79fb43a4d921a533ba0c2cb303324887993
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.
An alternative solution would be to change the table_set_display() function
arguments to unsigned type.
src/busctl/busctl.c