]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-message: output debug information about offset troubles
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Aug 2018 16:05:27 +0000 (18:05 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 09:53:20 +0000 (11:53 +0200)
src/libsystemd/sd-bus/bus-message.c

index eee8e39195565fcdb047688dff4dc85c2972e779..7fb48cb330c69a166e28c81847a2c8b684f7601e 100644 (file)
@@ -3820,8 +3820,11 @@ static int build_struct_offsets(
                                         x = size - (n_variable * sz);
 
                                 offset = m->rindex + x;
-                                if (offset < start)
+                                if (offset < start) {
+                                        log_debug("For type %s with alignment %zu, message specifies offset %zu which is smaller than previous end %zu + alignment = %zu",
+                                                  t, align, offset, previous, start);
                                         return -EBADMSG;
+                                }
                         } else
                                 /* Fixed size */
                                 offset = start + k;