From cc0b63a277066a1167a2478f51b93d868e3a90d3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 27 Dec 2025 09:32:22 -1000 Subject: [PATCH] fix --- esphome/components/wifi/wifi_component_esp_idf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/wifi/wifi_component_esp_idf.cpp b/esphome/components/wifi/wifi_component_esp_idf.cpp index ed2fdafba8..10fb54fef3 100644 --- a/esphome/components/wifi/wifi_component_esp_idf.cpp +++ b/esphome/components/wifi/wifi_component_esp_idf.cpp @@ -982,7 +982,7 @@ bool WiFiComponent::wifi_ap_ip_config_(const optional &manual_ip) { // This provides a standards-compliant way for clients to discover the captive portal if (captive_portal::global_captive_portal != nullptr) { // Buffer must be static - dhcps_set_option_info stores pointer, doesn't copy - static char captive_portal_uri[7 + network::IP_ADDRESS_BUFFER_SIZE]; // "http://" + IP + static char captive_portal_uri[24]; // "http://" (7) + IPv4 max (15) + null memcpy(captive_portal_uri, "http://", 7); network::IPAddress(&info.ip).str_to(captive_portal_uri + 7); err = esp_netif_dhcps_option(s_ap_netif, ESP_NETIF_OP_SET, ESP_NETIF_CAPTIVEPORTAL_URI, captive_portal_uri,