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