From c05f96a38622cd6b2c785a8d1f81d3c398ed6c78 Mon Sep 17 00:00:00 2001 From: Jeffin Mammen Date: Fri, 2 Mar 2018 21:10:38 +0200 Subject: [PATCH] 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 --- src/ap/wpa_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c index 9b287af9e..f3d1bbdc4 100644 --- a/src/ap/wpa_auth.c +++ b/src/ap/wpa_auth.c @@ -1492,7 +1492,7 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth, os_memcpy(key_data, kde, kde_len); WPA_PUT_BE16(key_mic + mic_len, kde_len); #ifdef CONFIG_FILS - } else if (!mic_len) { + } else if (!mic_len && kde) { const u8 *aad[1]; size_t aad_len[1];