mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 21:00:16 +01:00
ifnet: fix a possible NULL dereference
CID 75367 (#1 of 1): Dereference null return value (NULL_RETURNS) 30. dereference: Incrementing a pointer which might be null: pos.
This commit is contained in:
parent
4e0968182c
commit
12063468a3
1 changed files with 11 additions and 5 deletions
|
|
@ -362,11 +362,17 @@ eap_peap_reader (const char *eap_method,
|
|||
}
|
||||
|
||||
pos = strchr (*iter, '=');
|
||||
pos++;
|
||||
lower = g_ascii_strdown (pos, -1);
|
||||
g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, lower,
|
||||
NULL);
|
||||
g_free (lower);
|
||||
if (pos && *pos) {
|
||||
pos++;
|
||||
lower = g_ascii_strdown (pos, -1);
|
||||
g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, lower,
|
||||
NULL);
|
||||
g_free (lower);
|
||||
} else {
|
||||
g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_INVALID_CONNECTION,
|
||||
"No IEEE_8021X_INNER_AUTH_METHOD.");
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue