mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/supplicant_security_fixes_v3.2' into 'release/v3.2'
wpa_supplicant: Fix sprintf security bugs. (v3.2) See merge request espressif/esp-idf!5465
This commit is contained in:
commit
b3a5dc869f
@ -732,8 +732,7 @@ int eap_peer_tls_status(struct eap_sm *sm, struct eap_ssl_data *data,
|
||||
|
||||
if (tls_get_cipher(data->ssl_ctx, data->conn, name, sizeof(name)) == 0)
|
||||
{
|
||||
//ret = os_snprintf(buf + len, buflen - len,
|
||||
ret = sprintf(buf + len,
|
||||
ret = os_snprintf(buf + len, buflen - len,
|
||||
"EAP TLS cipher=%s\n", name);
|
||||
if (ret < 0 || (size_t) ret >= buflen - len)
|
||||
return len;
|
||||
|
@ -152,8 +152,7 @@ void asn1_oid_to_str(struct asn1_oid *oid, char *buf, size_t len)
|
||||
buf[0] = '\0';
|
||||
|
||||
for (i = 0; i < oid->len; i++) {
|
||||
//ret = os_snprintf(pos, buf + len - pos,
|
||||
ret = sprintf(pos,
|
||||
ret = os_snprintf(pos, buf + len - pos,
|
||||
"%s%lu",
|
||||
i == 0 ? "" : ".", oid->oid[i]);
|
||||
if (ret < 0 || ret >= buf + len - pos)
|
||||
|
Loading…
Reference in New Issue
Block a user