chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f92bdb
)
sd-bus: fix invalid stack access on test-bus-marshal
author
David Herrmann
<dh.herrmann@gmail.com>
Thu, 16 Jul 2015 12:57:59 +0000
(14:57 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:06:20 +0000
(10:06 +0100)
Make sure we actually parse "unsigned long long" if we encode a uint64_t.
Otherwise, we will get random data from the stack.
src/libelogind/sd-bus/test-bus-marshal.c
patch
|
blob
|
history
diff --git
a/src/libelogind/sd-bus/test-bus-marshal.c
b/src/libelogind/sd-bus/test-bus-marshal.c
index 73c6e41c8541ec7fca8e00b59ca66b2dd43c0a6c..59deaea89f0a1d1c7a8c6a37661b9a96121a0d46 100644
(file)
--- 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, 777
ULL, 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");