diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-16 14:57:59 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:06:20 +0100 |
commit | acfcd596701fed76897fb64396ac6a123576c6e1 (patch) | |
tree | 870abb11253f6dc92568aa8d4a331395525f8a79 /src/libelogind | |
parent | 2f92bdb77d4bcae53737f0e89bbc908556836a7d (diff) |
sd-bus: fix invalid stack access on test-bus-marshal
Make sure we actually parse "unsigned long long" if we encode a uint64_t.
Otherwise, we will get random data from the stack.
Diffstat (limited to 'src/libelogind')
-rw-r--r-- | src/libelogind/sd-bus/test-bus-marshal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libelogind/sd-bus/test-bus-marshal.c b/src/libelogind/sd-bus/test-bus-marshal.c index 73c6e41c8..59deaea89 100644 --- a/src/libelogind/sd-bus/test-bus-marshal.c +++ b/src/libelogind/sd-bus/test-bus-marshal.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) { r = sd_bus_message_append(m, "a{yv}", 2, 3, "s", "foo", 5, "s", "waldo"); assert_se(r >= 0); - r = sd_bus_message_append(m, "y(ty)y(yt)y", 8, 777, 7, 9, 77, 7777, 10); + r = sd_bus_message_append(m, "y(ty)y(yt)y", 8, 777ULL, 7, 9, 77, 7777ULL, 10); assert_se(r >= 0); r = sd_bus_message_append(m, "ba(ss)", 255, 3, "aaa", "1", "bbb", "2", "ccc", "3"); |