From: Adil Saeed Musthafa Date: Thu, 25 Jul 2024 19:51:07 +0000 (-0700) Subject: RSNO: Protect wpa_ie_buf3 from reuse explicitly X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=376adfea8debe5dae69976a5f5af6a56ecb9480e;p=thirdparty%2Fhostap.git RSNO: Protect wpa_ie_buf3 from reuse explicitly Use else-if check for better clarity regarding usage of wpa_ie_buf3 to make it explicit that memory is allocated for this pointer only once. Signed-off-by: Adil Saeed Musthafa --- diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 07844e436..68a868a00 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -4713,9 +4713,9 @@ SM_STATE(WPA_PTK, PTKINITNEGOTIATING) wpa_ie_len = pos - wpa_ie_buf3; wpa_hexdump(MSG_DEBUG, "EAPOL-Key msg 3/4 IEs after edits", wpa_ie, wpa_ie_len); - } - if ((conf->rsn_override_key_mgmt || conf->rsn_override_key_mgmt_2) && - !sm->rsn_override && !sm->rsn_override_2) { + } else if ((conf->rsn_override_key_mgmt || + conf->rsn_override_key_mgmt_2) && + !sm->rsn_override && !sm->rsn_override_2) { u8 *ie; size_t ie_len; u32 ids[] = {