FILS: Check kde more consistently to avoid static analyzer warnings

For FILS, __wpa_send_eapol() is called only with the kde != NULL, but a
static analyzer might not understand that. Add an explicit check kde !=
NULL similarly to the other cases going through the kde parameter to
silence such bogus warnings.

Signed-off-by: Jeffin Mammen <jmammen@codeaurora.org>
This commit is contained in:
Jeffin Mammen 2018-03-02 21:10:38 +02:00 committed by Jouni Malinen
parent 087474512f
commit c05f96a386

View File

@ -1492,7 +1492,7 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
os_memcpy(key_data, kde, kde_len); os_memcpy(key_data, kde, kde_len);
WPA_PUT_BE16(key_mic + mic_len, kde_len); WPA_PUT_BE16(key_mic + mic_len, kde_len);
#ifdef CONFIG_FILS #ifdef CONFIG_FILS
} else if (!mic_len) { } else if (!mic_len && kde) {
const u8 *aad[1]; const u8 *aad[1];
size_t aad_len[1]; size_t aad_len[1];