diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-19 14:29:00 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-19 14:29:00 +0900 |
commit | bccd91629213eba8e4f324387dee619a008ecb2f (patch) | |
tree | 9b1aa348c9dde50d339cb15c3a18305b5ab02a96 /src/libsystemd/sd-bus/bus-message.c | |
parent | 79cd22d6f389c3ee6d711a4c54dc39d3ce6a8c79 (diff) | |
download | systemd-bccd91629213eba8e4f324387dee619a008ecb2f.tar.gz |
sd-bus: use memdup_suffix0() instead of strndup()
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 774bf10219..5360bce904 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -5265,7 +5265,7 @@ int bus_message_parse_fields(sd_bus_message *m) { if (!b) return -EBADMSG; - sig = strndup(b+1, item_size - (b+1-(char*) q)); + sig = memdup_suffix0(b+1, item_size - (b+1-(char*) q)); if (!sig) return -ENOMEM; |