nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.62k stars 3.12k forks source link

uart: do not use uninitialized uart pins config #3540

Closed jasaw closed 1 year ago

jasaw commented 1 year ago

In some scenario, uart LUA module calls platform_uart_setup with uninitialized uart_pins_t pins config data structure. The result is random failure when calling uart.setup from LUA.

This PR fixes it.

@jmattsson Please review.

jmattsson commented 1 year ago

Yikes, nice catch.