From: Jouni Malinen Date: Sat, 7 Jun 2014 16:05:33 +0000 (+0300) Subject: GAS server: Explicitly check that home realm is available X-Git-Tag: hostap_2_3~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fde15a20acbe4f335fe98ab486c8214022ed75d;p=thirdparty%2Fhostap.git GAS server: Explicitly check that home realm is available This makes the code easier to understand for static analyzers to avoid false reports. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index 53e11ddaf..52d1b2420 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -414,7 +414,7 @@ static void anqp_add_nai_realm(struct hostapd_data *hapd, struct wpabuf *buf, gas_anqp_set_element_len(buf, realm_data_len); } gas_anqp_set_element_len(buf, len); - } else if (nai_home_realm && hapd->conf->nai_realm_data) { + } else if (nai_home_realm && hapd->conf->nai_realm_data && home_realm) { hs20_add_nai_home_realm_matches(hapd, buf, home_realm, home_realm_len); }