mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(wpa_supplicant): fix warnings found by GNU static analyzer
This commit is contained in:
parent
edbf6130db
commit
f328e06ed4
@ -433,6 +433,8 @@ int ieee802_1x_init(struct hostapd_data *hapd)
|
||||
|
||||
os_memset(&conf, 0, sizeof(conf));
|
||||
eap_cfg = os_zalloc(sizeof(struct eap_config));
|
||||
if (!eap_cfg)
|
||||
return -1;
|
||||
eap_cfg->max_auth_rounds = 100;
|
||||
eap_cfg->max_auth_rounds_short = 50;
|
||||
//eap_cfg->backend_auth = 1;
|
||||
|
@ -202,6 +202,10 @@ static int ieee802_11_parse_vendor_specific(struct wpa_supplicant *wpa_s, const
|
||||
case SAE_PK_OUI_TYPE:
|
||||
wpa_s->sae_pk_elems.sae_pk_len = elem->datalen - 4;
|
||||
wpa_s->sae_pk_elems.sae_pk = (u8*)os_zalloc(sizeof(u8)*(elem->datalen-4));
|
||||
if (!wpa_s->sae_pk_elems.sae_pk) {
|
||||
wpa_printf(MSG_EXCESSIVE, "Can not allocate memory for sae_pk");
|
||||
return -1;
|
||||
}
|
||||
os_memcpy(wpa_s->sae_pk_elems.sae_pk, pos+4, elem->datalen-4);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user