mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 01:58:39 +00:00
352150c7f1510d30afa2b51d4fcca253cac7605e
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
596 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
