From: Roy Marples Date: Tue, 7 Jun 2016 19:09:39 +0000 (+0000) Subject: Reserve enough space for a fully escaped SSID. X-Git-Tag: v6.11.1~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=283222036267cb4e033241b0ce1424cb82352c7f;p=thirdparty%2Fdhcpcd.git Reserve enough space for a fully escaped SSID. --- 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);