1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

bus-util: Fix reading uint32 properties

Fix copy&paste bug in map_basic() to use the correct data type for
SD_BUS_TYPE_UINT32. Before we were copying the wrong 32 bits into the
destination pointer, resulting in complete garbage on big-endian systems.

Fixes #2927
This commit is contained in:
Martin Pitt 2016-04-01 14:16:14 +02:00
parent 1db30aeab1
commit da8358c625

View File

@ -1068,7 +1068,7 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_
}
case SD_BUS_TYPE_UINT32: {
uint64_t u;
uint32_t u;
uint32_t *p = userdata;
r = sd_bus_message_read_basic(m, type, &u);