mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
49024c240ba262e911cd0e149b093b39ec34e7a9
Between accept_fn_ storing a raw PCB and accept() picking it up, the connection could error (RST, timeout). Without an error callback, lwip frees the PCB silently, leaving a dangling pointer. When accept() later creates LWIPRawImpl with it, the use-after-free corrupts the heap. Fix: register a lightweight error callback (no allocation) in accept_fn_ that nulls the array slot when the PCB is freed. accept() checks for null and skips freed PCBs. After shifting the array, tcp_arg pointers are updated for remaining entries.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
598 MiB
Languages
C++
55.7%
Python
43.7%
C
0.3%
JavaScript
0.2%
