From: David Herrmann Date: Thu, 16 Jul 2015 12:57:59 +0000 (+0200) Subject: sd-bus: fix invalid stack access on test-bus-marshal X-Git-Tag: v223~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f1d774135ae8c6fedb3a9dee45efe1fb42ac389;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c index 73c6e41c854..59deaea89f0 100644 --- a/src/libsystemd/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/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");