aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_pax.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eap_server/eap_server_pax.c')
-rw-r--r--src/eap_server/eap_server_pax.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/eap_server/eap_server_pax.c b/src/eap_server/eap_server_pax.c
index 782b8c3..3257789 100644
--- a/src/eap_server/eap_server_pax.c
+++ b/src/eap_server/eap_server_pax.c
@@ -327,13 +327,12 @@ static void eap_pax_process_std_2(struct eap_sm *sm,
}
data->cid_len = cid_len;
os_free(data->cid);
- data->cid = os_malloc(data->cid_len);
+ data->cid = os_memdup(pos + 2, data->cid_len);
if (data->cid == NULL) {
wpa_printf(MSG_INFO, "EAP-PAX: Failed to allocate memory for "
"CID");
return;
}
- os_memcpy(data->cid, pos + 2, data->cid_len);
pos += 2 + data->cid_len;
left -= 2 + data->cid_len;
wpa_hexdump_ascii(MSG_MSGDUMP, "EAP-PAX: CID",