chiark / gitweb /
bus: it's OK to send messages with an empty payload but non-empty signature
[elogind.git] / src / libsystemd-bus / bus-message.c
index 55fb47b5524a475749e9d6d31b5e5321bd060dc3..32af8609b3d0c0264aac21e99e33a389f02cf073 100644 (file)
@@ -4851,7 +4851,7 @@ int bus_message_parse_fields(sd_bus_message *m) {
         uint32_t unix_fds = 0;
         void *offsets = NULL;
         unsigned n_offsets = 0;
-        size_t sz;
+        size_t sz = 0;
         unsigned i = 0;
 
         assert(m);
@@ -5085,9 +5085,6 @@ int bus_message_parse_fields(sd_bus_message *m) {
         if (m->n_fds != unix_fds)
                 return -EBADMSG;
 
-        if (isempty(m->root_container.signature) != (BUS_MESSAGE_BODY_SIZE(m) == 0))
-                return -EBADMSG;
-
         switch (m->header->type) {
 
         case SD_BUS_MESSAGE_SIGNAL: