summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-01 14:16:14 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-04-01 14:16:14 +0200
commitda8358c625d3d7fbc0e9df172852c5f87d91e537 (patch)
treeb7756b336ea46161c61bba5dc04220ef4db387ce
parent1db30aeab10ca716aae877b298289fe1765f14fb (diff)
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
-rw-r--r--src/shared/bus-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 90b312a1a7..d9dd3c6a11 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -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);