]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make enough space for string 878/head
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Aug 2015 19:25:12 +0000 (22:25 +0300)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Aug 2015 19:25:14 +0000 (22:25 +0300)
Follow-up for PR #877.

src/libsystemd-network/sd-dhcp-lease.c

index 0d1e3746aaacd67ddc4ef0081e319f53f8bf9b05..f196a3f3dd8d8c9285cb086ed31073ceb33f945e 100644 (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)