1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 11:55:23 +03:00

network: make enough space for string

Follow-up for PR #877.
This commit is contained in:
Lennart Poettering 2015-08-05 22:25:12 +03:00
parent b5a306ef73
commit 30afef872e

View File

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