summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-08-05 22:58:55 +0200
committerTom Gundersen <teg@jklm.no>2015-08-05 22:58:55 +0200
commit511d2ffc8cc4e6c6b528aa96c4096f57bc52226e (patch)
treea4659a740eb4e43d69d15c39361b43002ffda450 /src
parentb5a306ef73f9c31499f2d97f8b9d3db514b56a09 (diff)
parent30afef872ee0e6cb675275566a858b8044ff0ff7 (diff)
Merge pull request #878 from poettering/network-dhcp-array-fix
network: make enough space for string
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/sd-dhcp-lease.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
index 0d1e3746aa..f196a3f3dd 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)