aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-02-04 01:14:29 (GMT)
committerJouni Malinen <j@w1.fi>2008-02-04 01:14:29 (GMT)
commit3a5b54a6886b0ed3bdd8c0f829f5b45977521fa6 (patch)
tree87035954df8b2c5225e8e00f69f538691007dc6d
parent68f701f8105791c334ce16dd31da16950391348a (diff)
downloadhostap-history-3a5b54a6886b0ed3bdd8c0f829f5b45977521fa6.zip
hostap-history-3a5b54a6886b0ed3bdd8c0f829f5b45977521fa6.tar.gz
hostap-history-3a5b54a6886b0ed3bdd8c0f829f5b45977521fa6.tar.bz2
Extend the identity workaround to remove all trailing null characters
-rw-r--r--src/eap_server/eap_aka.c2
-rw-r--r--src/eap_server/eap_sim.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/eap_server/eap_aka.c b/src/eap_server/eap_aka.c
index 462e50a..2d06965 100644
--- a/src/eap_server/eap_aka.c
+++ b/src/eap_server/eap_aka.c
@@ -588,7 +588,7 @@ static void eap_aka_determine_identity(struct eap_sm *sm,
}
identity_len = sm->identity_len;
- if (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
+ while (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
wpa_printf(MSG_DEBUG, "EAP-AKA: Workaround - drop last null "
"character from identity");
identity_len--;
diff --git a/src/eap_server/eap_sim.c b/src/eap_server/eap_sim.c
index 05c40d0..436c655 100644
--- a/src/eap_server/eap_sim.c
+++ b/src/eap_server/eap_sim.c
@@ -485,7 +485,7 @@ static void eap_sim_process_start(struct eap_sm *sm,
}
identity_len = sm->identity_len;
- if (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
+ while (identity_len > 0 && sm->identity[identity_len - 1] == '\0') {
wpa_printf(MSG_DEBUG, "EAP-SIM: Workaround - drop last null "
"character from identity");
identity_len--;