[PATCH] WNM: Fix time_zone handling in mgmt frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If time_advertisement=2 in the config file and time_zone is unset,
the current code wants to write the time_zone eid into mgmt frames.
Without this patch, it fails with a SEGV on os_strlen(hapd->conf->time_zone).

Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx>
---
 src/ap/ieee802_11_shared.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index d3733c8eb..cd74cd9a4 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -449,6 +449,9 @@ u8 * hostapd_eid_time_zone(struct hostapd_data *hapd, u8 *eid)
 	if (hapd->conf->time_advertisement != 2)
 		return eid;
 
+	if (hapd->conf->time_zone == NULL)
+		return eid;
+
 	len = os_strlen(hapd->conf->time_zone);
 
 	*eid++ = WLAN_EID_TIME_ZONE;
-- 
2.17.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux