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 <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2019-09-01 19:26:01 +02:00
parent f8ef450652
commit 71ec9be506

View file

@ -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;