]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Reserve enough space for a fully escaped SSID.
authorRoy Marples <roy@marples.name>
Tue, 7 Jun 2016 19:09:39 +0000 (19:09 +0000)
committerRoy Marples <roy@marples.name>
Tue, 7 Jun 2016 19:09:39 +0000 (19:09 +0000)
dhcp-common.c

index 74336fd613861148cdec8e4fc0dce9d0e0dbcd97..20b4efa3a3005000045223f7f76bcefd9cfc78c1 100644 (file)
@@ -830,7 +830,7 @@ int
 dhcp_set_leasefile(char *leasefile, size_t len, int family,
     const struct interface *ifp)
 {
-       char ssid[len];
+       char ssid[1 + (IF_SSIDLEN * 4) + 1]; /* - prefix and NUL terminated. */
 
        if (ifp->name[0] == '\0') {
                strlcpy(leasefile, ifp->ctx->pidfile, len);