summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-06-07 19:09:39 +0000
committerRoy Marples <roy@marples.name>2016-06-07 19:09:39 +0000
commit283222036267cb4e033241b0ce1424cb82352c7f (patch)
treef9ef25d25b90fe6ee8a4002c5fbb8be84f93d775
parentfc8cfb5016583036797dafadb8f8e92b0f7b4de4 (diff)
downloaddhcpcd-283222036267cb4e033241b0ce1424cb82352c7f.tar.xz
Reserve enough space for a fully escaped SSID.
-rw-r--r--dhcp-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcp-common.c b/dhcp-common.c
index 74336fd6..20b4efa3 100644
--- a/dhcp-common.c
+++ b/dhcp-common.c
@@ -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);