summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2014-01-12 00:30:49 +0800
committerKay Sievers <kay@vrfy.org>2014-01-12 00:30:49 +0800
commitec260edc1ca85a02f8a9e2e92401333ff986264b (patch)
tree05b4d52b9d8d88b3d204d143e1a71fa4d0e7cf98 /src/libsystemd-bus
parent5bf348d77ec35260e2c021ad11d08dca7b92498d (diff)
bus: fix length calculation when serializing SD_BUS_TYPE_SIGNATURE
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index 05cd512df6..0c8604c492 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -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)