1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

bus: fix length calculation when serializing SD_BUS_TYPE_SIGNATURE

This commit is contained in:
Kay Sievers 2014-01-12 00:30:49 +08:00
parent 5bf348d77e
commit ec260edc1c

View 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)