chiark / gitweb /
bus: fix length calculation when serializing SD_BUS_TYPE_SIGNATURE
authorKay Sievers <kay@vrfy.org>
Sat, 11 Jan 2014 16:30:49 +0000 (00:30 +0800)
committerKay Sievers <kay@vrfy.org>
Sat, 11 Jan 2014 16:30:49 +0000 (00:30 +0800)
src/libsystemd-bus/bus-message.c

index 05cd512df65e4f62273cbecd1fdbbc3de9b3fa28..0c8604c49257e7c2124ff6fd29620212178fec73 100644 (file)
@@ -1433,7 +1433,7 @@ int message_append_basic(sd_bus_message *m, char type, const void *p, const void
                                 *stored = (const uint8_t*) a + 4;
 
                 } else if (type == SD_BUS_TYPE_SIGNATURE) {
-                        *(uint8_t*) a = sz - 1;
+                        *(uint8_t*) a = sz - 2;
                         memcpy((uint8_t*) a + 1, p, sz - 1);
 
                         if (stored)