diff --git a/components/esp_wifi/Kconfig b/components/esp_wifi/Kconfig index e10917f6bde..867026e91cf 100644 --- a/components/esp_wifi/Kconfig +++ b/components/esp_wifi/Kconfig @@ -495,6 +495,7 @@ menu "Wi-Fi" bool "Enable DPP support" default n select ESP_WIFI_MBEDTLS_CRYPTO + select ESP_WIFI_MBO_SUPPORT help Select this option to enable WiFi Easy Connect Support. diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c b/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c index bbc3ee0fd11..60c46b1cbae 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_dpp.c @@ -180,12 +180,12 @@ static int esp_dpp_handle_config_obj(struct dpp_authentication *auth, wifi_config_t *wifi_cfg = &s_dpp_ctx.wifi_cfg; if (conf->ssid_len) { - os_memcpy(wifi_cfg->sta.ssid, conf->ssid, conf->ssid_len); + os_strlcpy((char*)wifi_cfg->sta.ssid, (char*)conf->ssid, sizeof(wifi_cfg->sta.ssid)); } if (dpp_akm_legacy(conf->akm)) { if (conf->passphrase[0]) - os_memcpy(wifi_cfg->sta.password, conf->passphrase, + os_strlcpy((char*)wifi_cfg->sta.password, (char*)conf->passphrase, sizeof(wifi_cfg->sta.password)); if (conf->akm == DPP_AKM_PSK_SAE) { wifi_cfg->sta.pmf_cfg.required = true; diff --git a/examples/wifi/wifi_easy_connect/dpp-enrollee/sdkconfig.defaults b/examples/wifi/wifi_easy_connect/dpp-enrollee/sdkconfig.defaults index 4e98cb814c5..a70ca117a62 100644 --- a/examples/wifi/wifi_easy_connect/dpp-enrollee/sdkconfig.defaults +++ b/examples/wifi/wifi_easy_connect/dpp-enrollee/sdkconfig.defaults @@ -1 +1,2 @@ +CONFIG_ESP_WIFI_MBO_SUPPORT=y CONFIG_ESP_WIFI_DPP_SUPPORT=y