From: Subrat Dash Date: Thu, 22 Sep 2011 12:42:03 +0000 (+0300) Subject: atheros: Fix WEXT SIOCGIWESSID use with WE-21 and newer X-Git-Tag: hostap-1-bp~211 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a5200e6997d85e4874f35a250c655e2110539a7;p=thirdparty%2Fhostap.git atheros: Fix WEXT SIOCGIWESSID use with WE-21 and newer The "too long" buffer (32+1 octets) prevented AP from starting up with 32 octet SSID with WE-21 and newer. Fix this by reducing the SIOCGIWESSID buffer length. --- diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c index 058705086..27ea18f86 100644 --- a/src/drivers/driver_atheros.c +++ b/src/drivers/driver_atheros.c @@ -1334,6 +1334,8 @@ atheros_get_ssid(void *priv, u8 *buf, int len) os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ); iwr.u.essid.pointer = (caddr_t) buf; iwr.u.essid.length = len; + iwr.u.essid.length = (len > IW_ESSID_MAX_SIZE) ? + IW_ESSID_MAX_SIZE : len; if (ioctl(drv->ioctl_sock, SIOCGIWESSID, &iwr) < 0) { perror("ioctl[SIOCGIWESSID]");