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

platform: platform_uart_setup handles null ptr #3539

Closed jasaw closed 1 year ago

jasaw commented 1 year ago

uart_pins_t* pins input parameter is supposed to accept a null pointer as well, but the code dereferences the pins pointer without checking whether pins is null or not.

This PR fixes it.

@jmattsson Please review.

jmattsson commented 1 year ago

Looks rather needed, thanks!