Skip to content

Commit

Permalink
Merge branch 'bugfix/wps_condition_chain_v5.0' into 'release/v5.0'
Browse files Browse the repository at this point in the history
fix(wifi): Fix static analyzer warning for WPS code (v5.0)

See merge request espressif/esp-idf!26495
  • Loading branch information
jack0c committed Oct 27, 2023
2 parents eb432da + 28ba29a commit 4bd203b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/wpa_supplicant/esp_supplicant/src/esp_wps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,15 +1058,18 @@ int wps_sm_rx_eapol_internal(u8 *src_addr, u8 *buf, u32 len)

tmp = (u8 *)(ehdr + 1) + 1;
ret = wps_process_wps_mX_req(tmp, plen - sizeof(*ehdr) - 1, &res);
if (ret == ESP_OK && res != WPS_FAILURE && res != WPS_FRAGMENT) {
if (res == WPS_FRAGMENT) {
wpa_printf(MSG_DEBUG, "wps frag, silently exit", res);
ret = ESP_OK;
break;
}
if (ret == ESP_OK && res != WPS_FAILURE) {
ret = wps_send_wps_mX_rsp(ehdr->identifier);

if (ret == ESP_OK) {
wpa_printf(MSG_DEBUG, "sm->wps->state = %d", sm->wps->state);
wps_start_msg_timer();
}
} else if (ret == ESP_OK && res == WPS_FRAGMENT) {
wpa_printf(MSG_DEBUG, "wps frag, continue...");
ret = ESP_OK;
} else {
ret = ESP_FAIL;
}
Expand Down

0 comments on commit 4bd203b

Please sign in to comment.