From: Lennart Poettering Date: Wed, 5 Aug 2015 19:25:12 +0000 (+0300) Subject: network: make enough space for string X-Git-Tag: v225~105^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30afef872ee0e6cb675275566a858b8044ff0ff7;p=thirdparty%2Fsystemd.git network: make enough space for string Follow-up for PR #877. --- diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index 0d1e3746aaa..f196a3f3dd8 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -779,7 +779,7 @@ int sd_dhcp_lease_save(sd_dhcp_lease *lease, const char *lease_file) { } LIST_FOREACH(options, option, lease->private_options) { - char key[strlen("OPTION_000")]; + char key[strlen("OPTION_000")+1]; snprintf(key, sizeof(key), "OPTION_%"PRIu8, option->tag); r = serialize_dhcp_option(f, key, option->data, option->length); if (r < 0)