From 71ec9be5064c473e6daed122c0c31113f974ce82 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 1 Sep 2019 19:26:01 +0200 Subject: [PATCH] iwinfo: Fix buffer size With WPA3 the wpa_key_mgmt string can be longer than 16 bytes. The sea-mixed setting for example is 27 bytes long: wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 SAE Increase the buffer to better detect more complicated authentication methods. Signed-off-by: Hauke Mehrtens --- iwinfo_nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index 83c75bf..690f8b2 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -1494,7 +1494,7 @@ static int nl80211_check_wepkey(const char *key) static int nl80211_get_encryption(const char *ifname, char *buf) { - char wpa[2], wpa_key_mgmt[16], wpa_pairwise[16], wpa_groupwise[16]; + char wpa[2], wpa_key_mgmt[64], wpa_pairwise[16], wpa_groupwise[16]; char auth_algs[2], wep_key0[27], wep_key1[27], wep_key2[27], wep_key3[27]; struct iwinfo_crypto_entry *c = (struct iwinfo_crypto_entry *)buf; -- 2.30.2