aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2003-07-11 11:31:38 (GMT)
committerJouni Malinen <j@w1.fi>2003-07-11 11:31:38 (GMT)
commitd0963bf270ba8612550f98359c8c960d1a2271e0 (patch)
treec98c984b42b3c0b4215b1ec3d4dbd9cfbdd6adb5
parent09a9ab838671aa091184fbea7194f44f6617698c (diff)
downloadhostap-history-d0963bf270ba8612550f98359c8c960d1a2271e0.zip
hostap-history-d0963bf270ba8612550f98359c8c960d1a2271e0.tar.gz
hostap-history-d0963bf270ba8612550f98359c8c960d1a2271e0.tar.bz2
Use length field in struct iw_point to determine SSID length. This allows
both NUL terminated and not NUL terminated data.
-rw-r--r--driver/modules/hostap_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/modules/hostap_ioctl.c b/driver/modules/hostap_ioctl.c
index 2f8b228..a45ea41 100644
--- a/driver/modules/hostap_ioctl.c
+++ b/driver/modules/hostap_ioctl.c
@@ -784,8 +784,8 @@ static int prism2_ioctl_siwessid(struct net_device *dev,
return -EINVAL;
}
- memcpy(local->essid, ssid, IW_ESSID_MAX_SIZE);
- local->essid[MAX_SSID_LEN] = '\0';
+ memcpy(local->essid, ssid, data->length);
+ local->essid[data->length] = '\0';
if ((!local->fw_ap &&
hostap_set_string(dev, HFA384X_RID_CNFDESIREDSSID, local->essid))