summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-01 14:16:14 +0200
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:12:57 +0200
commit368c3719b6eaa0767bbdee84c1f2d2876b83995b (patch)
tree04457269d67846da400f0d5bd086b21b2702e416 /src/shared
parent879674e2c9f8138364a839cd251ddd4ec97c7090 (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
Diffstat (limited to 'src/shared')
-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 02c0f3a79..94872a31c 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1072,7 +1072,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);