mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
Remove strcpy/strncpy function callings from supplicant
This commit is contained in:
parent
916a4d6524
commit
2aa6853d3e
@ -281,9 +281,6 @@ char * ets_strdup(const char *s);
|
||||
#ifndef os_strncmp
|
||||
#define os_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
|
||||
#endif
|
||||
#ifndef os_strncpy
|
||||
#define os_strncpy(d, s, n) strncpy((d), (s), (n))
|
||||
#endif
|
||||
#ifndef os_strrchr
|
||||
#define os_strrchr(s, c) strrchr((s), (c))
|
||||
#endif
|
||||
|
@ -661,7 +661,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
goto _out;
|
||||
}
|
||||
os_strncpy(sm->blob[0].name, CLIENT_CERT_NAME, BLOB_NAME_LEN+1);
|
||||
os_strlcpy(sm->blob[0].name, CLIENT_CERT_NAME, BLOB_NAME_LEN+1);
|
||||
sm->blob[0].len = g_wpa_client_cert_len;
|
||||
sm->blob[0].data = g_wpa_client_cert;
|
||||
}
|
||||
@ -672,7 +672,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
goto _out;
|
||||
}
|
||||
os_strncpy(sm->blob[1].name, PRIVATE_KEY_NAME, BLOB_NAME_LEN+1);
|
||||
os_strlcpy(sm->blob[1].name, PRIVATE_KEY_NAME, BLOB_NAME_LEN+1);
|
||||
sm->blob[1].len = g_wpa_private_key_len;
|
||||
sm->blob[1].data = g_wpa_private_key;
|
||||
}
|
||||
@ -683,7 +683,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
goto _out;
|
||||
}
|
||||
os_strncpy(sm->blob[2].name, CA_CERT_NAME, BLOB_NAME_LEN+1);
|
||||
os_strlcpy(sm->blob[2].name, CA_CERT_NAME, BLOB_NAME_LEN+1);
|
||||
sm->blob[2].len = g_wpa_ca_cert_len;
|
||||
sm->blob[2].data = g_wpa_ca_cert;
|
||||
}
|
||||
@ -694,7 +694,7 @@ int eap_peer_blob_init(struct eap_sm *sm)
|
||||
ret = -2;
|
||||
goto _out;
|
||||
}
|
||||
os_strncpy(sm->blob[3].name, "blob://", 8);
|
||||
os_strlcpy(sm->blob[3].name, "blob://", 8);
|
||||
sm->blob[3].len = g_wpa_pac_file_len;
|
||||
sm->blob[3].data = g_wpa_pac_file;
|
||||
}
|
||||
|
@ -1115,9 +1115,9 @@ static struct wpabuf * eap_peap_process(struct eap_sm *sm, void *priv,
|
||||
* label by default, but allow it to be configured with
|
||||
* phase1 parameter peaplabel=1. */
|
||||
if (data->peap_version > 1 || data->force_new_label)
|
||||
strcpy(label, "client PEAP encryption");
|
||||
os_strlcpy(label, "client PEAP encryption", 24);
|
||||
else
|
||||
strcpy(label, "client EAP encryption");
|
||||
os_strlcpy(label, "client EAP encryption", 24);
|
||||
wpa_printf(MSG_DEBUG, "EAP-PEAP: using label '%s' in "
|
||||
"key derivation", label);
|
||||
data->key_data =
|
||||
|
Loading…
x
Reference in New Issue
Block a user