From: Hauke Mehrtens Date: Sun, 1 Sep 2019 17:26:01 +0000 (+0200) Subject: iwinfo: Fix buffer size X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=71ec9be5064c473e6daed122c0c31113f974ce82;p=oweals%2Fiwinfo.git 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 --- 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;