mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 14:10:08 +01:00
wifi: fix check for PSK for new WPS credentials
src/devices/wifi/nm-device-wifi.c:1855:20: error: logical ‘or’ of collectively exhaustive tests is always true [-Werror=logical-op]
if (psk_len >= 8 || psk_len <= 63) {
^~
Fixes: 0eb7617504
This commit is contained in:
parent
225f7e8602
commit
aaefa2b07f
1 changed files with 1 additions and 1 deletions
|
|
@ -1852,7 +1852,7 @@ supplicant_iface_wps_credentials_cb (NMSupplicantInterface *iface,
|
|||
val = g_variant_lookup_value (credentials, "Key", G_VARIANT_TYPE_BYTESTRING);
|
||||
if (val) {
|
||||
array = g_variant_get_fixed_array (val, &psk_len, 1);
|
||||
if (psk_len >= 8 || psk_len <= 63) {
|
||||
if (psk_len >= 8 && psk_len <= 63) {
|
||||
memcpy (psk, array, psk_len);
|
||||
psk[psk_len] = '\0';
|
||||
secrets = g_variant_new_parsed ("[{%s, [{%s, <%s>}]}]",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue