summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-27 01:19:50 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-27 22:02:12 +0100
commit7fa934b0d35492b300b79848f4822ffc40eee21f (patch)
tree813c54117e114e0e9b64733b1bb2490096a6c362 /src/libsystemd/sd-bus/bus-message.c
parent78f9b196ab9671ceb625cd2abf90629ed201c24f (diff)
sd-bus: be stricter with mismatches between dbus1 and kdbus message headers
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 9bc05c2034..a4939b47c8 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -5170,6 +5170,10 @@ int bus_message_parse_fields(sd_bus_message *m) {
case SD_BUS_MESSAGE_SIGNAL:
if (!m->path || !m->interface || !m->member)
return -EBADMSG;
+
+ if (m->reply_cookie != 0)
+ return -EBADMSG;
+
break;
case SD_BUS_MESSAGE_METHOD_CALL:
@@ -5177,6 +5181,9 @@ int bus_message_parse_fields(sd_bus_message *m) {
if (!m->path || !m->member)
return -EBADMSG;
+ if (m->reply_cookie != 0)
+ return -EBADMSG;
+
break;
case SD_BUS_MESSAGE_METHOD_RETURN: