Message ID | 20180528202646.13796-1-markus.theil@tu-ilmenau.de |
---|---|
State | Accepted |
Headers | show |
Series | WNM: Fix time_zone handling in mgmt frames | expand |
On Mon, May 28, 2018 at 10:26:46PM +0200, Markus Theil wrote: > 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). Thanks, applied.
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;
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@tu-ilmenau.de> --- src/ap/ieee802_11_shared.c | 3 +++ 1 file changed, 3 insertions(+)